Skip to content

Instantly share code, notes, and snippets.

@taewookoh
Created April 9, 2017 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taewookoh/e08e3d53fe274241c1e8fbeeb482ef89 to your computer and use it in GitHub Desktop.
Save taewookoh/e08e3d53fe274241c1e8fbeeb482ef89 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
# 1 "<built-in>"
# 1 "experimental/ilyam/clang_bug/main.cpp"
#if 0 /* expanded by -frewrite-includes */
#include <memory>
#endif /* expanded by -frewrite-includes */
# 1 "experimental/ilyam/clang_bug/main.cpp"
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 1 3
// <memory> -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
* Copyright (c) 1997-1999
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*/
/** @file include/memory
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_MEMORY
#define _GLIBCXX_MEMORY 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 47 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
/**
* @defgroup memory Memory
* @ingroup utilities
*
* Components for memory allocation, deallocation, and management.
*/
/**
* @defgroup pointer_abstractions Pointer Abstractions
* @ingroup memory
*
* Smart pointers, etc.
*/
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_algobase.h>
#endif /* expanded by -frewrite-includes */
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 1 3
// Core algorithmic facilities -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_algobase.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{algorithm}
*/
#ifndef _STL_ALGOBASE_H
#define _STL_ALGOBASE_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 1 3
// Predefined symbols and macros -*- C++ -*-
// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/c++config.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iosfwd}
*/
#ifndef _GLIBCXX_CXX_CONFIG_H
#define _GLIBCXX_CXX_CONFIG_H 1
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__ 20150123
// Macros for various attributes.
// _GLIBCXX_PURE
// _GLIBCXX_CONST
// _GLIBCXX_NORETURN
// _GLIBCXX_NOTHROW
// _GLIBCXX_VISIBILITY
#ifndef _GLIBCXX_PURE
# define _GLIBCXX_PURE __attribute__ ((__pure__))
#endif
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_CONST
# define _GLIBCXX_CONST __attribute__ ((__const__))
#endif
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_NORETURN
# define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
#endif
# 53 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// See below for C++
#ifndef _GLIBCXX_NOTHROW
# ifndef __cplusplus
# define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
# endif
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#endif
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macros for visibility attributes.
// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
// _GLIBCXX_VISIBILITY
# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
#else
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// If this is not supplied by the OS-specific or CPU-specific
// headers included below, it will be defined to an empty default.
# define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V)
#endif
# 73 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macros for deprecated attributes.
// _GLIBCXX_USE_DEPRECATED
// _GLIBCXX_DEPRECATED
#ifndef _GLIBCXX_USE_DEPRECATED
# define _GLIBCXX_USE_DEPRECATED 1
#endif
# 80 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined(__DEPRECATED) && (__cplusplus >= 201103L)
# define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__))
#else
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_DEPRECATED
#endif
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macros for ABI tag attributes.
#ifndef _GLIBCXX_ABI_TAG_CXX11
# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11")))
#endif
# 91 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if __cplusplus
// Macro for constexpr, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_CONSTEXPR
# if __cplusplus >= 201103L
# define _GLIBCXX_CONSTEXPR constexpr
# define _GLIBCXX_USE_CONSTEXPR constexpr
# else
# 101 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_CONSTEXPR
# define _GLIBCXX_USE_CONSTEXPR const
# endif
# 104 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#endif
# 105 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macro for noexcept, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_NOEXCEPT
# if __cplusplus >= 201103L
# define _GLIBCXX_NOEXCEPT noexcept
# define _GLIBCXX_USE_NOEXCEPT noexcept
# define _GLIBCXX_THROW(_EXC)
# else
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_NOEXCEPT
# define _GLIBCXX_USE_NOEXCEPT throw()
# define _GLIBCXX_THROW(_EXC) throw(_EXC)
# endif
# 117 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#endif
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_NOTHROW
# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT
#endif
# 122 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_THROW_OR_ABORT
# if __EXCEPTIONS
# define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC))
# else
# 127 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort())
# endif
# 129 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#endif
# 130 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macro for extern template, ie controling template linkage via use
// of extern keyword on template declaration. As documented in the g++
// manual, it inhibits all implicit instantiations and is used
// throughout the library to avoid multiple weak definitions for
// required types that are already explicitly instantiated in the
// library binary. This substantially reduces the binary size of
// resulting executables.
// Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern
// templates only in basic_string, thus activating its debug-mode
// checks even at -O0.
# define _GLIBCXX_EXTERN_TEMPLATE 1
/*
Outline of libstdc++ namespaces.
namespace std
{
namespace __debug { }
namespace __parallel { }
namespace __profile { }
namespace __cxx1998 { }
namespace __detail { }
namespace rel_ops { }
namespace tr1
{
namespace placeholders { }
namespace regex_constants { }
namespace __detail { }
}
namespace tr2 { }
namespace decimal { }
namespace chrono { }
namespace placeholders { }
namespace regex_constants { }
namespace this_thread { }
namespace experimental { }
}
namespace abi { }
namespace __gnu_cxx
{
namespace __detail { }
}
For full details see:
http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html
*/
namespace std
{
typedef __SIZE_TYPE__ size_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#if __cplusplus >= 201103L
typedef decltype(nullptr) nullptr_t;
#endif
# 194 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
}
// Defined if inline namespaces are used for versioning.
# define _GLIBCXX_INLINE_VERSION 0
// Inline namespace for symbol versioning.
#if _GLIBCXX_INLINE_VERSION
namespace std
{
inline namespace __7 { }
namespace rel_ops { inline namespace __7 { } }
namespace tr1
{
inline namespace __7 { }
namespace placeholders { inline namespace __7 { } }
namespace regex_constants { inline namespace __7 { } }
namespace __detail { inline namespace __7 { } }
}
namespace tr2
{ inline namespace __7 { } }
namespace decimal { inline namespace __7 { } }
namespace chrono { inline namespace __7 { } }
namespace placeholders { inline namespace __7 { } }
namespace regex_constants { inline namespace __7 { } }
namespace this_thread { inline namespace __7 { } }
namespace experimental { inline namespace __7 { } }
namespace __detail { inline namespace __7 { } }
}
namespace __gnu_cxx
{
inline namespace __7 { }
namespace __detail { inline namespace __7 { } }
}
# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 {
# define _GLIBCXX_END_NAMESPACE_VERSION }
#else
# 240 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_VERSION
#endif
# 243 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Inline namespaces for special modes: debug, parallel, profile.
#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \
|| defined(_GLIBCXX_PROFILE)
namespace std
{
// Non-inline namespace for components replaced by alternates in active mode.
namespace __cxx1998
{
#if _GLIBCXX_INLINE_VERSION
inline namespace __7 { }
#endif
# 256 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
}
// Inline namespace for debug mode.
# ifdef _GLIBCXX_DEBUG
inline namespace __debug { }
# endif
# 262 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Inline namespaces for parallel mode.
# ifdef _GLIBCXX_PARALLEL
inline namespace __parallel { }
# endif
# 267 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Inline namespaces for profile mode
# ifdef _GLIBCXX_PROFILE
inline namespace __profile { }
# endif
# 272 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
}
// Check for invalid usage and unsupported mixed-mode use.
# if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL)
# error illegal use of multiple inlined namespaces
# endif
# 278 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG)
# error illegal use of multiple inlined namespaces
# endif
# 281 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL)
# error illegal use of multiple inlined namespaces
# endif
# 284 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Check for invalid use due to lack for weak symbols.
# if __NO_INLINE__ && !__GXX_WEAK__
# warning currently using inlined namespace mode which may fail \
without inlining due to lack of weak symbols
# endif
# 290 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#endif
# 291 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macros for namespace scope. Either namespace std:: or the name
// of some nested namespace within it corresponding to the active mode.
// _GLIBCXX_STD_A
// _GLIBCXX_STD_C
//
// Macros for opening/closing conditional namespaces.
// _GLIBCXX_BEGIN_NAMESPACE_ALGO
// _GLIBCXX_END_NAMESPACE_ALGO
// _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// _GLIBCXX_END_NAMESPACE_CONTAINER
#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE)
# define _GLIBCXX_STD_C __cxx1998
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \
namespace _GLIBCXX_STD_C { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_CONTAINER \
_GLIBCXX_END_NAMESPACE_VERSION }
# undef _GLIBCXX_EXTERN_TEMPLATE
# define _GLIBCXX_EXTERN_TEMPLATE -1
#endif
# 311 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifdef _GLIBCXX_PARALLEL
# define _GLIBCXX_STD_A __cxx1998
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO \
namespace _GLIBCXX_STD_A { _GLIBCXX_BEGIN_NAMESPACE_VERSION
# define _GLIBCXX_END_NAMESPACE_ALGO \
_GLIBCXX_END_NAMESPACE_VERSION }
#endif
# 319 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_STD_A
# define _GLIBCXX_STD_A std
#endif
# 323 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_STD_C
# define _GLIBCXX_STD_C std
#endif
# 327 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_BEGIN_NAMESPACE_ALGO
# define _GLIBCXX_BEGIN_NAMESPACE_ALGO
#endif
# 331 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_END_NAMESPACE_ALGO
# define _GLIBCXX_END_NAMESPACE_ALGO
#endif
# 335 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
# define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif
# 339 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_END_NAMESPACE_CONTAINER
# define _GLIBCXX_END_NAMESPACE_CONTAINER
#endif
# 343 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// GLIBCXX_ABI Deprecated
// Define if compatibility should be provided for -mlong-double-64.
#undef _GLIBCXX_LONG_DOUBLE_COMPAT
// Inline namespace for long double 128 mode.
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
namespace std
{
inline namespace __gnu_cxx_ldbl128 { }
}
# define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128::
# define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 {
# define _GLIBCXX_END_NAMESPACE_LDBL }
#else
# 358 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_NAMESPACE_LDBL
# define _GLIBCXX_BEGIN_NAMESPACE_LDBL
# define _GLIBCXX_END_NAMESPACE_LDBL
#endif
# 362 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Assert.
#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
# define __glibcxx_assert(_Condition)
#else
# 367 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
namespace std
{
// Avoid the use of assert, because we're trying to keep the <cassert>
// include out of the mix.
inline void
__replacement_assert(const char* __file, int __line,
const char* __function, const char* __condition)
{
__builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
__function, __condition);
__builtin_abort();
}
}
#define __glibcxx_assert(_Condition) \
do \
{ \
if (! (_Condition)) \
std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \
#_Condition); \
} while (false)
#endif
# 388 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macros for race detectors.
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain
// atomic (lock-free) synchronization to race detectors:
// the race detector will infer a happens-before arc from the former to the
// latter when they share the same argument pointer.
//
// The most frequent use case for these macros (and the only case in the
// current implementation of the library) is atomic reference counting:
// void _M_remove_reference()
// {
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount);
// if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0)
// {
// _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount);
// _M_destroy(__a);
// }
// }
// The annotations in this example tell the race detector that all memory
// accesses occurred when the refcount was positive do not race with
// memory accesses which occurred after the refcount became zero.
#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE
# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A)
#endif
# 413 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER
# define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A)
#endif
# 416 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Macros for C linkage: define extern "C" linkage only when using C++.
# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
# define _GLIBCXX_END_EXTERN_C }
#else // !__cplusplus
# 422 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_BEGIN_EXTERN_C
# define _GLIBCXX_END_EXTERN_C
#endif
# 425 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// First includes.
// Pick up any OS-specific definitions.
#if 0 /* expanded by -frewrite-includes */
#include <bits/os_defines.h>
#endif /* expanded by -frewrite-includes */
# 430 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/os_defines.h" 1 3
// Specific definitions for GNU/Linux -*- C++ -*-
// Copyright (C) 2000-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/os_defines.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iosfwd}
*/
#ifndef _GLIBCXX_OS_DEFINES
#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
// This keeps isanum, et al from being propagated as macros.
#define __NO_CTYPE 1
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/os_defines.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 1 3
/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _FEATURES_H
#define _FEATURES_H 1
/* These are defined by the user (or the compiler)
to specify the desired environment:
__STRICT_ANSI__ ISO Standard C.
_ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
_ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
if >=199309L, add IEEE Std 1003.1b-1993;
if >=199506L, add IEEE Std 1003.1c-1995;
if >=200112L, all of IEEE 1003.1-2004
if >=200809L, all of IEEE 1003.1-2008
_XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
Single Unix conformance is wanted, to 600 for the
sixth revision, to 700 for the seventh revision.
_XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
_LARGEFILE_SOURCE Some more functions for correct standard I/O.
_LARGEFILE64_SOURCE Additional functionality from LFS for large files.
_FILE_OFFSET_BITS=N Select default filesystem interface.
_ATFILE_SOURCE Additional *at interfaces.
_GNU_SOURCE All of the above, plus GNU extensions.
_DEFAULT_SOURCE The default set of features (taking precedence over
__STRICT_ANSI__).
_REENTRANT Select additionally reentrant object.
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
_FORTIFY_SOURCE If set to numeric value > 0 additional security
measures are defined, according to level.
The `-ansi' switch to the GNU C compiler, and standards conformance
options such as `-std=c99', define __STRICT_ANSI__. If none of
these are defined, or if _DEFAULT_SOURCE is defined, the default is
to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
200809L, as well as enabling miscellaneous functions from BSD and
SVID. If more than one of these are defined, they accumulate. For
example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
give you ISO C, 1003.1, and 1003.2, but nothing else.
These are defined by this file and are used by the
header files to decide what to declare or define:
__USE_ISOC11 Define ISO C11 things.
__USE_ISOC99 Define ISO C99 things.
__USE_ISOC95 Define ISO C90 AMD1 (C95) things.
__USE_POSIX Define IEEE Std 1003.1 things.
__USE_POSIX2 Define IEEE Std 1003.2 things.
__USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
__USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
__USE_XOPEN Define XPG things.
__USE_XOPEN_EXTENDED Define X/Open Unix things.
__USE_UNIX98 Define Single Unix V2 things.
__USE_XOPEN2K Define XPG6 things.
__USE_XOPEN2KXSI Define XPG6 XSI things.
__USE_XOPEN2K8 Define XPG7 things.
__USE_XOPEN2K8XSI Define XPG7 XSI things.
__USE_LARGEFILE Define correct standard I/O things.
__USE_LARGEFILE64 Define LFS things with separate names.
__USE_FILE_OFFSET64 Define 64bit interface as default.
__USE_MISC Define things from 4.3BSD or System V Unix.
__USE_ATFILE Define *at interfaces and AT_* constants for them.
__USE_GNU Define GNU extensions.
__USE_REENTRANT Define reentrant/thread-safe *_r functions.
__USE_FORTIFY_LEVEL Additional security measures used, according to level.
The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
defined by this file unconditionally. `__GNU_LIBRARY__' is provided
only for compatibility. All new code should use the other symbols
to test for features.
All macros listed above as possibly being defined by this file are
explicitly undefined if they are not explicitly defined.
Feature-test macros that are not defined by the user or compiler
but are implied by the other feature-test macros defined (or by the
lack of any definitions) are defined by the file. */
/* Undefine everything, so we get a clean slate. */
#undef __USE_ISOC11
#undef __USE_ISOC99
#undef __USE_ISOC95
#undef __USE_ISOCXX11
#undef __USE_POSIX
#undef __USE_POSIX2
#undef __USE_POSIX199309
#undef __USE_POSIX199506
#undef __USE_XOPEN
#undef __USE_XOPEN_EXTENDED
#undef __USE_UNIX98
#undef __USE_XOPEN2K
#undef __USE_XOPEN2KXSI
#undef __USE_XOPEN2K8
#undef __USE_XOPEN2K8XSI
#undef __USE_LARGEFILE
#undef __USE_LARGEFILE64
#undef __USE_FILE_OFFSET64
#undef __USE_MISC
#undef __USE_ATFILE
#undef __USE_GNU
#undef __USE_REENTRANT
#undef __USE_FORTIFY_LEVEL
#undef __KERNEL_STRICT_NAMES
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
#ifndef _LOOSE_KERNEL_NAMES
# define __KERNEL_STRICT_NAMES
#endif
# 127 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* Convenience macros to test the versions of glibc and gcc.
Use them like this:
#if __GNUC_PREREQ (2,8)
... code requiring gcc 2.8 or later ...
#endif
Note - they won't work for gcc1 or glibc1, since the _MINOR macros
were not defined then. */
#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
# 139 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define __GNUC_PREREQ(maj, min) 0
#endif
# 141 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
_DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
issue a warning; the expectation is that the source is being
transitioned to use the new macro. */
#if (defined _BSD_SOURCE || defined _SVID_SOURCE) \
&& !defined _DEFAULT_SOURCE
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE 1
#endif
# 152 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
#ifdef _GNU_SOURCE
# undef _ISOC95_SOURCE
# define _ISOC95_SOURCE 1
# undef _ISOC99_SOURCE
# define _ISOC99_SOURCE 1
# undef _ISOC11_SOURCE
# define _ISOC11_SOURCE 1
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L
# undef _XOPEN_SOURCE
# define _XOPEN_SOURCE 700
# undef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED 1
# undef _LARGEFILE64_SOURCE
# define _LARGEFILE64_SOURCE 1
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE 1
# undef _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
#endif
# 176 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
define _DEFAULT_SOURCE. */
#if (defined _DEFAULT_SOURCE \
|| (!defined __STRICT_ANSI__ \
&& !defined _ISOC99_SOURCE \
&& !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
&& !defined _XOPEN_SOURCE))
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE 1
#endif
# 187 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* This is to enable the ISO C11 extension. */
#if (defined _ISOC11_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
# define __USE_ISOC11 1
#endif
# 193 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* This is to enable the ISO C99 extension. */
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
# define __USE_ISOC99 1
#endif
# 199 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* This is to enable the ISO C90 Amendment 1:1995 extension. */
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
# define __USE_ISOC95 1
#endif
# 205 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* This is to enable compatibility for ISO C++11.
So far g++ does not provide a macro. Check the temporary macro for
now, too. */
#if ((defined __cplusplus && __cplusplus >= 201103L) \
|| defined __GXX_EXPERIMENTAL_CXX0X__)
# define __USE_ISOCXX11 1
#endif
# 214 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
is defined, use POSIX.1-2008 (or another version depending on
_XOPEN_SOURCE). */
#ifdef _DEFAULT_SOURCE
# if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE
# define __USE_POSIX_IMPLICITLY 1
# endif
# 222 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L
#endif
# 227 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \
!defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
# define _POSIX_SOURCE 1
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
# define _POSIX_C_SOURCE 2
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
# 233 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define _POSIX_C_SOURCE 199506L
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
# 235 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define _POSIX_C_SOURCE 200112L
# else
# 237 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define _POSIX_C_SOURCE 200809L
# endif
# 239 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define __USE_POSIX_IMPLICITLY 1
#endif
# 241 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE
# define __USE_POSIX 1
#endif
# 245 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
# define __USE_POSIX2 1
#endif
# 249 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if (_POSIX_C_SOURCE - 0) >= 199309L
# define __USE_POSIX199309 1
#endif
# 253 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if (_POSIX_C_SOURCE - 0) >= 199506L
# define __USE_POSIX199506 1
#endif
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if (_POSIX_C_SOURCE - 0) >= 200112L
# define __USE_XOPEN2K 1
# undef __USE_ISOC95
# define __USE_ISOC95 1
# undef __USE_ISOC99
# define __USE_ISOC99 1
#endif
# 265 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if (_POSIX_C_SOURCE - 0) >= 200809L
# define __USE_XOPEN2K8 1
# undef _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
#endif
# 271 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#ifdef _XOPEN_SOURCE
# define __USE_XOPEN 1
# if (_XOPEN_SOURCE - 0) >= 500
# define __USE_XOPEN_EXTENDED 1
# define __USE_UNIX98 1
# undef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1
# if (_XOPEN_SOURCE - 0) >= 600
# if (_XOPEN_SOURCE - 0) >= 700
# define __USE_XOPEN2K8 1
# define __USE_XOPEN2K8XSI 1
# endif
# 284 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define __USE_XOPEN2K 1
# define __USE_XOPEN2KXSI 1
# undef __USE_ISOC95
# define __USE_ISOC95 1
# undef __USE_ISOC99
# define __USE_ISOC99 1
# endif
# 291 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# else
# 292 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# ifdef _XOPEN_SOURCE_EXTENDED
# define __USE_XOPEN_EXTENDED 1
# endif
# 295 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# endif
# 296 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#endif
# 297 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#ifdef _LARGEFILE_SOURCE
# define __USE_LARGEFILE 1
#endif
# 301 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#ifdef _LARGEFILE64_SOURCE
# define __USE_LARGEFILE64 1
#endif
# 305 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
# define __USE_FILE_OFFSET64 1
#endif
# 309 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if defined _DEFAULT_SOURCE
# define __USE_MISC 1
#endif
# 313 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#ifdef _ATFILE_SOURCE
# define __USE_ATFILE 1
#endif
# 317 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#ifdef _GNU_SOURCE
# define __USE_GNU 1
#endif
# 321 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if defined _REENTRANT || defined _THREAD_SAFE
# define __USE_REENTRANT 1
#endif
# 325 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
# elif !__GNUC_PREREQ (4, 1)
# 330 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# warning _FORTIFY_SOURCE requires GCC 4.1 or later
# elif _FORTIFY_SOURCE > 1
# 332 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define __USE_FORTIFY_LEVEL 2
# else
# 334 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# define __USE_FORTIFY_LEVEL 1
# endif
# 336 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#endif
# 337 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#ifndef __USE_FORTIFY_LEVEL
# define __USE_FORTIFY_LEVEL 0
#endif
# 340 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* Get definitions of __STDC_* predefined macros, if the compiler has
not preincluded this header automatically. */
#if 0 /* expanded by -frewrite-includes */
#include <stdc-predef.h>
#endif /* expanded by -frewrite-includes */
# 343 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 1 3
/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _STDC_PREDEF_H
#define _STDC_PREDEF_H 1
/* This header is separate from features.h so that the compiler can
include it implicitly at the start of every compilation. It must
not itself include <features.h> or any other header that includes
<features.h> because the implicit include comes before any feature
test macros that may be defined in a source file before it first
explicitly includes a system header. GCC knows the name of this
header in order to preinclude it. */
/* glibc's intent is to support the IEC 559 math functionality, real
and complex. If the GCC (4.9 and later) predefined macros
specifying compiler intent are available, use them to determine
whether the overall intent is to support these features; otherwise,
presume an older compiler has intent to support these features and
define these macros by default. */
#ifdef __GCC_IEC_559
# if __GCC_IEC_559 > 0
# define __STDC_IEC_559__ 1
# endif
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
#else
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
# define __STDC_IEC_559__ 1
#endif
# 43 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
#ifdef __GCC_IEC_559_COMPLEX
# if __GCC_IEC_559_COMPLEX > 0
# define __STDC_IEC_559_COMPLEX__ 1
# endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
#else
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
# define __STDC_IEC_559_COMPLEX__ 1
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
Unicode 6.0. */
#define __STDC_ISO_10646__ 201103L
/* We do not support C11 <threads.h>. */
#define __STDC_NO_THREADS__ 1
#endif
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdc-predef.h" 3
# 344 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 2 3
/* This macro indicates that the installed library is the GNU C Library.
For historic reasons the value now is 6 and this will stay from now
on. The use of this variable is deprecated. Use __GLIBC__ and
__GLIBC_MINOR__ now (see below) when you want to test for a specific
GNU C library version and use the values in <gnu/lib-names.h> to get
the sonames of the shared libraries. */
#undef __GNU_LIBRARY__
#define __GNU_LIBRARY__ 6
/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
#define __GLIBC__ 2
#define __GLIBC_MINOR__ 20
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
/* This is here only because every header file already includes this one. */
#ifndef __ASSEMBLER__
# ifndef _SYS_CDEFS_H
#if 0 /* expanded by -frewrite-includes */
# include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 365 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 1 3
/* Copyright (C) 1992-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _SYS_CDEFS_H
#define _SYS_CDEFS_H 1
/* We are almost always included from features.h. */
#ifndef _FEATURES_H
#if 0 /* expanded by -frewrite-includes */
# include <features.h>
#endif /* expanded by -frewrite-includes */
# 23 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# 24 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif
# 25 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* The GNU libc does not support any K&R compilers or the traditional mode
of ISO C compilers anymore. Check for some of the combinations not
anymore supported. */
#if defined __GNUC__ && !defined __STDC__
# error "You need a ISO C conforming compiler to use the glibc headers"
#endif
# 32 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Some user header file might have defined this before. */
#undef __P
#undef __PMT
#ifdef __GNUC__
/* All functions, except those with callbacks or those that
synchronize memory, are leaf functions. */
# if __GNUC_PREREQ (4, 6) && !defined _LIBC
# define __LEAF , __leaf__
# define __LEAF_ATTR __attribute__ ((__leaf__))
# else
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __LEAF
# define __LEAF_ATTR
# endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
# define __THROW __attribute__ ((__nothrow__ __LEAF))
# define __THROWNL __attribute__ ((__nothrow__))
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# else
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
# define __THROWNL throw ()
# define __NTH(fct) __LEAF_ATTR fct throw ()
# else
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __THROW
# define __THROWNL
# define __NTH(fct) fct
# endif
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# endif
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#else /* Not GCC. */
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __inline /* No inline functions. */
# define __THROW
# define __THROWNL
# define __NTH(fct) fct
#endif /* GCC. */
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* These two macros are not used in glibc anymore. They are kept here
only because some other projects expect the macros to be defined. */
#define __P(args) args
#define __PMT(args) args
/* For these things, GCC behaves the ANSI way normally,
and the non-ANSI way under -traditional. */
#define __CONCAT(x,y) x ## y
#define __STRING(x) #x
/* This is not a typedef so `const __ptr_t' does the right thing. */
#define __ptr_t void *
#define __long_double_t long double
/* C++ needs to know that types and declarations are C, not C++. */
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# 101 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __BEGIN_DECLS
# define __END_DECLS
#endif
# 104 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* The standard library needs the functions from the ISO C90 standard
in the std namespace. At the same time we want to be safe for
future changes and we include the ISO C99 code in the non-standard
namespace __c99. The C++ wrapper header take case of adding the
definitions to the global namespace. */
#if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES
# define __BEGIN_NAMESPACE_STD namespace std {
# define __END_NAMESPACE_STD }
# define __USING_NAMESPACE_STD(name) using std::name;
# define __BEGIN_NAMESPACE_C99 namespace __c99 {
# define __END_NAMESPACE_C99 }
# define __USING_NAMESPACE_C99(name) using __c99::name;
#else
# 119 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* For compatibility we do not add the declarations into any
namespace. They will end up in the global namespace which is what
old code expects. */
# define __BEGIN_NAMESPACE_STD
# define __END_NAMESPACE_STD
# define __USING_NAMESPACE_STD(name)
# define __BEGIN_NAMESPACE_C99
# define __END_NAMESPACE_C99
# define __USING_NAMESPACE_C99(name)
#endif
# 129 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Fortify support. */
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
#define __bos0(ptr) __builtin_object_size (ptr, 0)
#define __fortify_function __extern_always_inline __attribute_artificial__
#if __GNUC_PREREQ (4,3)
# define __warndecl(name, msg) \
extern void name (void) __attribute__((__warning__ (msg)))
# define __warnattr(msg) __attribute__((__warning__ (msg)))
# define __errordecl(name, msg) \
extern void name (void) __attribute__((__error__ (msg)))
#else
# 143 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __warndecl(name, msg) extern void name (void)
# define __warnattr(msg)
# define __errordecl(name, msg) extern void name (void)
#endif
# 147 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Support for flexible arrays. */
#if __GNUC_PREREQ (2,97)
/* GCC 2.97 supports C99 flexible array members. */
# define __flexarr []
#else
# 153 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# ifdef __GNUC__
# define __flexarr [0]
# else
# 156 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __flexarr []
# else
# 159 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Some other non-C99 compiler. Approximate with [1]. */
# define __flexarr [1]
# endif
# 162 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# endif
# 163 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif
# 164 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* __asm__ ("xyz") is used throughout the headers to rename functions
at the assembly language level. This is wrapped by the __REDIRECT
macro, in order to support compilers that can do this some other
way. When compilers don't support asm-names at all, we have to do
preprocessor tricks instead (which don't have exactly the right
semantics, but it's the best we can do).
Example:
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
#if defined __GNUC__ && __GNUC__ >= 2
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
# ifdef __cplusplus
# define __REDIRECT_NTH(name, proto, alias) \
name proto __THROW __asm__ (__ASMNAME (#alias))
# define __REDIRECT_NTHNL(name, proto, alias) \
name proto __THROWNL __asm__ (__ASMNAME (#alias))
# else
# 185 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __REDIRECT_NTH(name, proto, alias) \
name proto __asm__ (__ASMNAME (#alias)) __THROW
# define __REDIRECT_NTHNL(name, proto, alias) \
name proto __asm__ (__ASMNAME (#alias)) __THROWNL
# endif
# 190 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
/*
#elif __SOME_OTHER_COMPILER__
# define __REDIRECT(name, proto, alias) name proto; \
_Pragma("let " #name " = " #alias)
*/
#endif
# 200 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* GCC has various useful declarations that can be made with the
`__attribute__' syntax. All of the ways we use this do fine if
they are omitted for compilers that don't understand it. */
#if !defined __GNUC__ || __GNUC__ < 2
# define __attribute__(xyz) /* Ignore */
#endif
# 207 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* At some point during the gcc 2.96 development the `malloc' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (2,96)
# define __attribute_malloc__ __attribute__ ((__malloc__))
#else
# 214 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_malloc__ /* Ignore */
#endif
# 216 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Tell the compiler which arguments to an allocation function
indicate the size of the allocation. */
#if __GNUC_PREREQ (4, 3)
# define __attribute_alloc_size__(params) \
__attribute__ ((__alloc_size__ params))
#else
# 223 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_alloc_size__(params) /* Ignore. */
#endif
# 225 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (2,96)
# define __attribute_pure__ __attribute__ ((__pure__))
#else
# 232 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_pure__ /* Ignore */
#endif
# 234 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* This declaration tells the compiler that the value is constant. */
#if __GNUC_PREREQ (2,5)
# define __attribute_const__ __attribute__ ((__const__))
#else
# 239 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_const__ /* Ignore */
#endif
# 241 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (3,1)
# define __attribute_used__ __attribute__ ((__used__))
# define __attribute_noinline__ __attribute__ ((__noinline__))
#else
# 249 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_used__ __attribute__ ((__unused__))
# define __attribute_noinline__ /* Ignore */
#endif
# 252 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* gcc allows marking deprecated functions. */
#if __GNUC_PREREQ (3,2)
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
#else
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_deprecated__ /* Ignore */
#endif
# 259 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* At some point during the gcc 2.8 development the `format_arg' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings.
If several `format_arg' attributes are given for the same function, in
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
all designated arguments are considered. */
#if __GNUC_PREREQ (2,8)
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
#else
# 269 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_format_arg__(x) /* Ignore */
#endif
# 271 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* At some point during the gcc 2.97 development the `strfmon' format
attribute for functions was introduced. We don't want to use it
unconditionally (although this would be possible) since it
generates warnings. */
#if __GNUC_PREREQ (2,97)
# define __attribute_format_strfmon__(a,b) \
__attribute__ ((__format__ (__strfmon__, a, b)))
#else
# 280 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_format_strfmon__(a,b) /* Ignore */
#endif
# 282 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* The nonull function attribute allows to mark pointer parameters which
must not be NULL. */
#if __GNUC_PREREQ (3,3)
# define __nonnull(params) __attribute__ ((__nonnull__ params))
#else
# 288 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __nonnull(params)
#endif
# 290 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* If fortification mode, we warn about unused results of certain
function calls which can lead to problems. */
#if __GNUC_PREREQ (3,4)
# define __attribute_warn_unused_result__ \
__attribute__ ((__warn_unused_result__))
# if __USE_FORTIFY_LEVEL > 0
# define __wur __attribute_warn_unused_result__
# endif
# 299 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#else
# 300 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_warn_unused_result__ /* empty */
#endif
# 302 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#ifndef __wur
# define __wur /* Ignore */
#endif
# 305 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Forces a function to be always inlined. */
#if __GNUC_PREREQ (3,2)
# define __always_inline __inline __attribute__ ((__always_inline__))
#else
# 310 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __always_inline __inline
#endif
# 312 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Associate error messages with the source location of the call site rather
than with the source location inside the function. */
#if __GNUC_PREREQ (4,3)
# define __attribute_artificial__ __attribute__ ((__artificial__))
#else
# 318 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __attribute_artificial__ /* Ignore */
#endif
# 320 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#ifdef __GNUC__
/* One of these will be defined if the __gnu_inline__ attribute is
available. In C++, __GNUC_GNU_INLINE__ will be defined even though
__inline does not use the GNU inlining rules. If neither macro is
defined, this version of GCC only supports GNU inline semantics. */
# if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
# define __extern_always_inline \
extern __always_inline __attribute__ ((__gnu_inline__))
# else
# 331 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __extern_inline extern __inline
# define __extern_always_inline extern __always_inline
# endif
# 334 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#else /* Not GCC. */
# 335 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __extern_inline /* Ignore */
# define __extern_always_inline /* Ignore */
#endif
# 338 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* GCC 4.3 and above allow passing all anonymous arguments of an
__extern_always_inline function to some other vararg function. */
#if __GNUC_PREREQ (4,3)
# define __va_arg_pack() __builtin_va_arg_pack ()
# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
#endif
# 345 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* It is possible to compile containing GCC extensions even if GCC is
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
version 2.8. */
#if !__GNUC_PREREQ (2,8)
# define __extension__ /* Ignore */
#endif
# 353 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* __restrict is known in EGCS 1.2 and above. */
#if !__GNUC_PREREQ (2,92)
# define __restrict /* Ignore */
#endif
# 358 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
GCC 3.1 supports this. */
#if __GNUC_PREREQ (3,1) && !defined __GNUG__
# define __restrict_arr __restrict
#else
# 365 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# ifdef __GNUC__
# define __restrict_arr /* Not supported in old GCC. */
# else
# 368 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __restrict_arr restrict
# else
# 371 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
/* Some other non-C99 compiler. */
# define __restrict_arr /* Not supported. */
# endif
# 374 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# endif
# 375 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif
# 376 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#if __GNUC__ >= 3
# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
# define __glibc_likely(cond) __builtin_expect ((cond), 1)
#else
# 381 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define __glibc_unlikely(cond) (cond)
# define __glibc_likely(cond) (cond)
#endif
# 384 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#if (!defined _Noreturn \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
&& !__GNUC_PREREQ (4,7))
# if __GNUC_PREREQ (2,8)
# define _Noreturn __attribute__ ((__noreturn__))
# else
# 391 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# define _Noreturn
# endif
# 393 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif
# 394 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/wordsize.h>
#endif /* expanded by -frewrite-includes */
# 395 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 1 3
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# define __WORDSIZE 32
#endif
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
#ifdef __x86_64__
# define __WORDSIZE_TIME64_COMPAT32 1
/* Both x86-64 and x32 use the 64-bit system call interface. */
# define __SYSCALL_WORDSIZE 64
#endif
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# 396 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 2 3
#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
# define __LDBL_COMPAT 1
# ifdef __REDIRECT
# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
# define __LDBL_REDIR(name, proto) \
__LDBL_REDIR1 (name, proto, __nldbl_##name)
# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
# define __LDBL_REDIR_NTH(name, proto) \
__LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
# define __LDBL_REDIR1_DECL(name, alias) \
extern __typeof (name) name __asm (__ASMNAME (#alias));
# define __LDBL_REDIR_DECL(name) \
extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
# define __REDIRECT_LDBL(name, proto, alias) \
__LDBL_REDIR1 (name, proto, __nldbl_##alias)
# define __REDIRECT_NTH_LDBL(name, proto, alias) \
__LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
# endif
# 415 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif
# 416 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#if !defined __LDBL_COMPAT || !defined __REDIRECT
# define __LDBL_REDIR1(name, proto, alias) name proto
# define __LDBL_REDIR(name, proto) name proto
# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
# define __LDBL_REDIR_DECL(name)
# ifdef __REDIRECT
# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
# define __REDIRECT_NTH_LDBL(name, proto, alias) \
__REDIRECT_NTH (name, proto, alias)
# endif
# 427 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif
# 428 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
#endif /* sys/cdefs.h */
# 430 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sys/cdefs.h" 3
# 366 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 2 3
# endif
# 367 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* If we don't have __REDIRECT, prototypes will be missing if
__USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */
# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT
# define __USE_LARGEFILE 1
# define __USE_LARGEFILE64 1
# endif
# 374 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
#endif /* !ASSEMBLER */
# 376 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* Decide whether we can define 'extern inline' functions in headers. */
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
&& defined __extern_inline
# define __USE_EXTERN_INLINES 1
#endif
# 383 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
/* This is here only because every header file already includes this one.
Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
<gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
that will always return failure (and set errno to ENOSYS). */
#if 0 /* expanded by -frewrite-includes */
#include <gnu/stubs.h>
#endif /* expanded by -frewrite-includes */
# 389 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 1 3
/* This file is automatically generated.
This file selects the right generated file of `__stub_FUNCTION' macros
based on the architecture being compiled for. */
#if !defined __x86_64__
#if 0 /* expanded by -frewrite-includes */
# include <gnu/stubs-32.h>
#endif /* expanded by -frewrite-includes */
# 7 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
#endif
# 9 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
#if defined __x86_64__ && defined __LP64__
#if 0 /* expanded by -frewrite-includes */
# include <gnu/stubs-64.h>
#endif /* expanded by -frewrite-includes */
# 10 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs-64.h" 1 3
/* This file is automatically generated.
It defines a symbol `__stub_FUNCTION' for each function
in the C library which is a stub, meaning it will fail
every time called, usually setting errno to ENOSYS. */
#ifdef _LIBC
#error Applications may not define the macro _LIBC
#endif
# 9 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs-64.h" 3
#define __stub_bdflush
#define __stub_chflags
#define __stub_fattach
#define __stub_fchflags
#define __stub_fdetach
#define __stub_getmsg
#define __stub_gtty
#define __stub_lchmod
#define __stub_putmsg
#define __stub_revoke
#define __stub_setlogin
#define __stub_sigreturn
#define __stub_sstk
#define __stub_stty
# 11 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 2 3
#endif
# 12 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
#if defined __x86_64__ && defined __ILP32__
#if 0 /* expanded by -frewrite-includes */
# include <gnu/stubs-x32.h>
#endif /* expanded by -frewrite-includes */
# 13 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
#endif
# 15 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/gnu/stubs.h" 3
# 390 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 2 3
#endif /* features.h */
# 393 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/features.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/os_defines.h" 2 3
// Provide a declaration for the possibly deprecated gets function, as
// glibc 2.15 and later does not declare gets for ISO C11 when
// __GNU_SOURCE is defined.
#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
# undef _GLIBCXX_HAVE_GETS
#endif
# 47 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/os_defines.h" 3
#endif
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/os_defines.h" 3
# 431 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 2 3
// Pick up any CPU-specific definitions.
#if 0 /* expanded by -frewrite-includes */
#include <bits/cpu_defines.h>
#endif /* expanded by -frewrite-includes */
# 433 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/cpu_defines.h" 1 3
// Specific definitions for generic platforms -*- C++ -*-
// Copyright (C) 2005-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/cpu_defines.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iosfwd}
*/
#ifndef _GLIBCXX_CPU_DEFINES
#define _GLIBCXX_CPU_DEFINES 1
#endif
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/cpu_defines.h" 3
# 434 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 2 3
// If platform uses neither visibility nor psuedo-visibility,
// specify empty default for namespace annotation macros.
#ifndef _GLIBCXX_PSEUDO_VISIBILITY
# define _GLIBCXX_PSEUDO_VISIBILITY(V)
#endif
# 440 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// Certain function definitions that are meant to be overridable from
// user code are decorated with this macro. For some targets, this
// macro causes these definitions to be weak.
#ifndef _GLIBCXX_WEAK_DEFINITION
# define _GLIBCXX_WEAK_DEFINITION
#endif
# 447 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// The remainder of the prewritten config is automatic; all the
// user hooks are listed above.
// Create a boolean flag to be used to determine if --fast-math is set.
#ifdef __FAST_MATH__
# define _GLIBCXX_FAST_MATH 1
#else
# 456 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# define _GLIBCXX_FAST_MATH 0
#endif
# 458 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
// This marks string literals in header files to be extracted for eventual
// translation. It is primarily used for messages in thrown exceptions; see
// src/functexcept.cc. We use __N because the more traditional _N is used
// for something else under certain OSes (see BADNAMES).
#define __N(msgid) (msgid)
// For example, <windows.h> is known to #define min and max as macros...
#undef min
#undef max
// End of prewritten config; the settings discovered at configure time follow.
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `acosf' function. */
#define _GLIBCXX_HAVE_ACOSF 1
/* Define to 1 if you have the `acosl' function. */
#define _GLIBCXX_HAVE_ACOSL 1
/* Define to 1 if you have the `asinf' function. */
#define _GLIBCXX_HAVE_ASINF 1
/* Define to 1 if you have the `asinl' function. */
#define _GLIBCXX_HAVE_ASINL 1
/* Define to 1 if the target assembler supports .symver directive. */
#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
/* Define to 1 if you have the `atan2f' function. */
#define _GLIBCXX_HAVE_ATAN2F 1
/* Define to 1 if you have the `atan2l' function. */
#define _GLIBCXX_HAVE_ATAN2L 1
/* Define to 1 if you have the `atanf' function. */
#define _GLIBCXX_HAVE_ATANF 1
/* Define to 1 if you have the `atanl' function. */
#define _GLIBCXX_HAVE_ATANL 1
/* Define to 1 if you have the `at_quick_exit' function. */
#define _GLIBCXX_HAVE_AT_QUICK_EXIT 1
/* Define to 1 if the target assembler supports thread-local storage. */
/* #undef _GLIBCXX_HAVE_CC_TLS */
/* Define to 1 if you have the `ceilf' function. */
#define _GLIBCXX_HAVE_CEILF 1
/* Define to 1 if you have the `ceill' function. */
#define _GLIBCXX_HAVE_CEILL 1
/* Define to 1 if you have the <complex.h> header file. */
#define _GLIBCXX_HAVE_COMPLEX_H 1
/* Define to 1 if you have the `cosf' function. */
#define _GLIBCXX_HAVE_COSF 1
/* Define to 1 if you have the `coshf' function. */
#define _GLIBCXX_HAVE_COSHF 1
/* Define to 1 if you have the `coshl' function. */
#define _GLIBCXX_HAVE_COSHL 1
/* Define to 1 if you have the `cosl' function. */
#define _GLIBCXX_HAVE_COSL 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define _GLIBCXX_HAVE_DLFCN_H 1
/* Define if EBADMSG exists. */
#define _GLIBCXX_HAVE_EBADMSG 1
/* Define if ECANCELED exists. */
#define _GLIBCXX_HAVE_ECANCELED 1
/* Define if ECHILD exists. */
#define _GLIBCXX_HAVE_ECHILD 1
/* Define if EIDRM exists. */
#define _GLIBCXX_HAVE_EIDRM 1
/* Define to 1 if you have the <endian.h> header file. */
#define _GLIBCXX_HAVE_ENDIAN_H 1
/* Define if ENODATA exists. */
#define _GLIBCXX_HAVE_ENODATA 1
/* Define if ENOLINK exists. */
#define _GLIBCXX_HAVE_ENOLINK 1
/* Define if ENOSPC exists. */
#define _GLIBCXX_HAVE_ENOSPC 1
/* Define if ENOSR exists. */
#define _GLIBCXX_HAVE_ENOSR 1
/* Define if ENOSTR exists. */
#define _GLIBCXX_HAVE_ENOSTR 1
/* Define if ENOTRECOVERABLE exists. */
#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
/* Define if ENOTSUP exists. */
#define _GLIBCXX_HAVE_ENOTSUP 1
/* Define if EOVERFLOW exists. */
#define _GLIBCXX_HAVE_EOVERFLOW 1
/* Define if EOWNERDEAD exists. */
#define _GLIBCXX_HAVE_EOWNERDEAD 1
/* Define if EPERM exists. */
#define _GLIBCXX_HAVE_EPERM 1
/* Define if EPROTO exists. */
#define _GLIBCXX_HAVE_EPROTO 1
/* Define if ETIME exists. */
#define _GLIBCXX_HAVE_ETIME 1
/* Define if ETIMEDOUT exists. */
#define _GLIBCXX_HAVE_ETIMEDOUT 1
/* Define if ETXTBSY exists. */
#define _GLIBCXX_HAVE_ETXTBSY 1
/* Define if EWOULDBLOCK exists. */
#define _GLIBCXX_HAVE_EWOULDBLOCK 1
/* Define to 1 if you have the <execinfo.h> header file. */
#define _GLIBCXX_HAVE_EXECINFO_H 1
/* Define to 1 if you have the `expf' function. */
#define _GLIBCXX_HAVE_EXPF 1
/* Define to 1 if you have the `expl' function. */
#define _GLIBCXX_HAVE_EXPL 1
/* Define to 1 if you have the `fabsf' function. */
#define _GLIBCXX_HAVE_FABSF 1
/* Define to 1 if you have the `fabsl' function. */
#define _GLIBCXX_HAVE_FABSL 1
/* Define to 1 if you have the <fenv.h> header file. */
#define _GLIBCXX_HAVE_FENV_H 1
/* Define to 1 if you have the `finite' function. */
#define _GLIBCXX_HAVE_FINITE 1
/* Define to 1 if you have the `finitef' function. */
#define _GLIBCXX_HAVE_FINITEF 1
/* Define to 1 if you have the `finitel' function. */
#define _GLIBCXX_HAVE_FINITEL 1
/* Define to 1 if you have the <float.h> header file. */
#define _GLIBCXX_HAVE_FLOAT_H 1
/* Define to 1 if you have the `floorf' function. */
#define _GLIBCXX_HAVE_FLOORF 1
/* Define to 1 if you have the `floorl' function. */
#define _GLIBCXX_HAVE_FLOORL 1
/* Define to 1 if you have the `fmodf' function. */
#define _GLIBCXX_HAVE_FMODF 1
/* Define to 1 if you have the `fmodl' function. */
#define _GLIBCXX_HAVE_FMODL 1
/* Define to 1 if you have the `fpclass' function. */
/* #undef _GLIBCXX_HAVE_FPCLASS */
/* Define to 1 if you have the <fp.h> header file. */
/* #undef _GLIBCXX_HAVE_FP_H */
/* Define to 1 if you have the `frexpf' function. */
#define _GLIBCXX_HAVE_FREXPF 1
/* Define to 1 if you have the `frexpl' function. */
#define _GLIBCXX_HAVE_FREXPL 1
/* Define if _Unwind_GetIPInfo is available. */
#define _GLIBCXX_HAVE_GETIPINFO 1
/* Define if gets is available in <stdio.h>. */
#define _GLIBCXX_HAVE_GETS 1
/* Define to 1 if you have the `hypot' function. */
#define _GLIBCXX_HAVE_HYPOT 1
/* Define to 1 if you have the `hypotf' function. */
#define _GLIBCXX_HAVE_HYPOTF 1
/* Define to 1 if you have the `hypotl' function. */
#define _GLIBCXX_HAVE_HYPOTL 1
/* Define if you have the iconv() function. */
#define _GLIBCXX_HAVE_ICONV 1
/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef _GLIBCXX_HAVE_IEEEFP_H */
/* Define if int64_t is available in <stdint.h>. */
#define _GLIBCXX_HAVE_INT64_T 1
/* Define if int64_t is a long. */
#define _GLIBCXX_HAVE_INT64_T_LONG 1
/* Define if int64_t is a long long. */
/* #undef _GLIBCXX_HAVE_INT64_T_LONG_LONG */
/* Define to 1 if you have the <inttypes.h> header file. */
#define _GLIBCXX_HAVE_INTTYPES_H 1
/* Define to 1 if you have the `isinf' function. */
#define _GLIBCXX_HAVE_ISINF 1
/* Define to 1 if you have the `isinff' function. */
#define _GLIBCXX_HAVE_ISINFF 1
/* Define to 1 if you have the `isinfl' function. */
#define _GLIBCXX_HAVE_ISINFL 1
/* Define to 1 if you have the `isnan' function. */
#define _GLIBCXX_HAVE_ISNAN 1
/* Define to 1 if you have the `isnanf' function. */
#define _GLIBCXX_HAVE_ISNANF 1
/* Define to 1 if you have the `isnanl' function. */
#define _GLIBCXX_HAVE_ISNANL 1
/* Defined if iswblank exists. */
#define _GLIBCXX_HAVE_ISWBLANK 1
/* Define if LC_MESSAGES is available in <locale.h>. */
#define _GLIBCXX_HAVE_LC_MESSAGES 1
/* Define to 1 if you have the `ldexpf' function. */
#define _GLIBCXX_HAVE_LDEXPF 1
/* Define to 1 if you have the `ldexpl' function. */
#define _GLIBCXX_HAVE_LDEXPL 1
/* Define to 1 if you have the <libintl.h> header file. */
#define _GLIBCXX_HAVE_LIBINTL_H 1
/* Only used in build directory testsuite_hooks.h. */
#define _GLIBCXX_HAVE_LIMIT_AS 1
/* Only used in build directory testsuite_hooks.h. */
#define _GLIBCXX_HAVE_LIMIT_DATA 1
/* Only used in build directory testsuite_hooks.h. */
#define _GLIBCXX_HAVE_LIMIT_FSIZE 1
/* Only used in build directory testsuite_hooks.h. */
#define _GLIBCXX_HAVE_LIMIT_RSS 1
/* Only used in build directory testsuite_hooks.h. */
#define _GLIBCXX_HAVE_LIMIT_VMEM 0
/* Define if futex syscall is available. */
#define _GLIBCXX_HAVE_LINUX_FUTEX 1
/* Define to 1 if you have the <locale.h> header file. */
#define _GLIBCXX_HAVE_LOCALE_H 1
/* Define to 1 if you have the `log10f' function. */
#define _GLIBCXX_HAVE_LOG10F 1
/* Define to 1 if you have the `log10l' function. */
#define _GLIBCXX_HAVE_LOG10L 1
/* Define to 1 if you have the `logf' function. */
#define _GLIBCXX_HAVE_LOGF 1
/* Define to 1 if you have the `logl' function. */
#define _GLIBCXX_HAVE_LOGL 1
/* Define to 1 if you have the <machine/endian.h> header file. */
/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
/* Define to 1 if you have the <machine/param.h> header file. */
/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
/* Define if mbstate_t exists in wchar.h. */
#define _GLIBCXX_HAVE_MBSTATE_T 1
/* Define to 1 if you have the <memory.h> header file. */
#define _GLIBCXX_HAVE_MEMORY_H 1
/* Define to 1 if you have the `modf' function. */
#define _GLIBCXX_HAVE_MODF 1
/* Define to 1 if you have the `modff' function. */
#define _GLIBCXX_HAVE_MODFF 1
/* Define to 1 if you have the `modfl' function. */
#define _GLIBCXX_HAVE_MODFL 1
/* Define to 1 if you have the <nan.h> header file. */
/* #undef _GLIBCXX_HAVE_NAN_H */
/* Define if poll is available in <poll.h>. */
#define _GLIBCXX_HAVE_POLL 1
/* Define to 1 if you have the `powf' function. */
#define _GLIBCXX_HAVE_POWF 1
/* Define to 1 if you have the `powl' function. */
#define _GLIBCXX_HAVE_POWL 1
/* Define to 1 if you have the `qfpclass' function. */
/* #undef _GLIBCXX_HAVE_QFPCLASS */
/* Define to 1 if you have the `quick_exit' function. */
#define _GLIBCXX_HAVE_QUICK_EXIT 1
/* Define to 1 if you have the `setenv' function. */
#define _GLIBCXX_HAVE_SETENV 1
/* Define to 1 if you have the `sincos' function. */
#define _GLIBCXX_HAVE_SINCOS 1
/* Define to 1 if you have the `sincosf' function. */
#define _GLIBCXX_HAVE_SINCOSF 1
/* Define to 1 if you have the `sincosl' function. */
#define _GLIBCXX_HAVE_SINCOSL 1
/* Define to 1 if you have the `sinf' function. */
#define _GLIBCXX_HAVE_SINF 1
/* Define to 1 if you have the `sinhf' function. */
#define _GLIBCXX_HAVE_SINHF 1
/* Define to 1 if you have the `sinhl' function. */
#define _GLIBCXX_HAVE_SINHL 1
/* Define to 1 if you have the `sinl' function. */
#define _GLIBCXX_HAVE_SINL 1
/* Defined if sleep exists. */
/* #undef _GLIBCXX_HAVE_SLEEP */
/* Define to 1 if you have the `sqrtf' function. */
#define _GLIBCXX_HAVE_SQRTF 1
/* Define to 1 if you have the `sqrtl' function. */
#define _GLIBCXX_HAVE_SQRTL 1
/* Define to 1 if you have the <stdalign.h> header file. */
#define _GLIBCXX_HAVE_STDALIGN_H 1
/* Define to 1 if you have the <stdbool.h> header file. */
#define _GLIBCXX_HAVE_STDBOOL_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define _GLIBCXX_HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define _GLIBCXX_HAVE_STDLIB_H 1
/* Define if strerror_l is available in <string.h>. */
#define _GLIBCXX_HAVE_STRERROR_L 1
/* Define if strerror_r is available in <string.h>. */
#define _GLIBCXX_HAVE_STRERROR_R 1
/* Define to 1 if you have the <strings.h> header file. */
#define _GLIBCXX_HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define _GLIBCXX_HAVE_STRING_H 1
/* Define to 1 if you have the `strtof' function. */
#define _GLIBCXX_HAVE_STRTOF 1
/* Define to 1 if you have the `strtold' function. */
#define _GLIBCXX_HAVE_STRTOLD 1
/* Define if strxfrm_l is available in <string.h>. */
#define _GLIBCXX_HAVE_STRXFRM_L 1
/* Define to 1 if the target runtime linker supports binding the same symbol
to different versions. */
#define _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1
/* Define to 1 if you have the <sys/filio.h> header file. */
/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/ipc.h> header file. */
#define _GLIBCXX_HAVE_SYS_IPC_H 1
/* Define to 1 if you have the <sys/isa_defs.h> header file. */
/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
/* Define to 1 if you have the <sys/machine.h> header file. */
/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define _GLIBCXX_HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have a suitable <sys/sdt.h> header file */
/* #undef _GLIBCXX_HAVE_SYS_SDT_H */
/* Define to 1 if you have the <sys/sem.h> header file. */
#define _GLIBCXX_HAVE_SYS_SEM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define _GLIBCXX_HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysinfo.h> header file. */
#define _GLIBCXX_HAVE_SYS_SYSINFO_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define _GLIBCXX_HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define _GLIBCXX_HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> header file. */
#define _GLIBCXX_HAVE_SYS_UIO_H 1
/* Define if S_IFREG is available in <sys/stat.h>. */
/* #undef _GLIBCXX_HAVE_S_IFREG */
/* Define if S_IFREG is available in <sys/stat.h>. */
#define _GLIBCXX_HAVE_S_ISREG 1
/* Define to 1 if you have the `tanf' function. */
#define _GLIBCXX_HAVE_TANF 1
/* Define to 1 if you have the `tanhf' function. */
#define _GLIBCXX_HAVE_TANHF 1
/* Define to 1 if you have the `tanhl' function. */
#define _GLIBCXX_HAVE_TANHL 1
/* Define to 1 if you have the `tanl' function. */
#define _GLIBCXX_HAVE_TANL 1
/* Define to 1 if you have the <tgmath.h> header file. */
#define _GLIBCXX_HAVE_TGMATH_H 1
/* Define to 1 if the target supports thread-local storage. */
#define _GLIBCXX_HAVE_TLS 1
/* Define to 1 if you have the <unistd.h> header file. */
#define _GLIBCXX_HAVE_UNISTD_H 1
/* Defined if usleep exists. */
/* #undef _GLIBCXX_HAVE_USLEEP */
/* Defined if vfwscanf exists. */
#define _GLIBCXX_HAVE_VFWSCANF 1
/* Defined if vswscanf exists. */
#define _GLIBCXX_HAVE_VSWSCANF 1
/* Defined if vwscanf exists. */
#define _GLIBCXX_HAVE_VWSCANF 1
/* Define to 1 if you have the <wchar.h> header file. */
#define _GLIBCXX_HAVE_WCHAR_H 1
/* Defined if wcstof exists. */
#define _GLIBCXX_HAVE_WCSTOF 1
/* Define to 1 if you have the <wctype.h> header file. */
#define _GLIBCXX_HAVE_WCTYPE_H 1
/* Defined if Sleep exists. */
/* #undef _GLIBCXX_HAVE_WIN32_SLEEP */
/* Define if writev is available in <sys/uio.h>. */
#define _GLIBCXX_HAVE_WRITEV 1
/* Define to 1 if you have the `_acosf' function. */
/* #undef _GLIBCXX_HAVE__ACOSF */
/* Define to 1 if you have the `_acosl' function. */
/* #undef _GLIBCXX_HAVE__ACOSL */
/* Define to 1 if you have the `_asinf' function. */
/* #undef _GLIBCXX_HAVE__ASINF */
/* Define to 1 if you have the `_asinl' function. */
/* #undef _GLIBCXX_HAVE__ASINL */
/* Define to 1 if you have the `_atan2f' function. */
/* #undef _GLIBCXX_HAVE__ATAN2F */
/* Define to 1 if you have the `_atan2l' function. */
/* #undef _GLIBCXX_HAVE__ATAN2L */
/* Define to 1 if you have the `_atanf' function. */
/* #undef _GLIBCXX_HAVE__ATANF */
/* Define to 1 if you have the `_atanl' function. */
/* #undef _GLIBCXX_HAVE__ATANL */
/* Define to 1 if you have the `_ceilf' function. */
/* #undef _GLIBCXX_HAVE__CEILF */
/* Define to 1 if you have the `_ceill' function. */
/* #undef _GLIBCXX_HAVE__CEILL */
/* Define to 1 if you have the `_cosf' function. */
/* #undef _GLIBCXX_HAVE__COSF */
/* Define to 1 if you have the `_coshf' function. */
/* #undef _GLIBCXX_HAVE__COSHF */
/* Define to 1 if you have the `_coshl' function. */
/* #undef _GLIBCXX_HAVE__COSHL */
/* Define to 1 if you have the `_cosl' function. */
/* #undef _GLIBCXX_HAVE__COSL */
/* Define to 1 if you have the `_expf' function. */
/* #undef _GLIBCXX_HAVE__EXPF */
/* Define to 1 if you have the `_expl' function. */
/* #undef _GLIBCXX_HAVE__EXPL */
/* Define to 1 if you have the `_fabsf' function. */
/* #undef _GLIBCXX_HAVE__FABSF */
/* Define to 1 if you have the `_fabsl' function. */
/* #undef _GLIBCXX_HAVE__FABSL */
/* Define to 1 if you have the `_finite' function. */
/* #undef _GLIBCXX_HAVE__FINITE */
/* Define to 1 if you have the `_finitef' function. */
/* #undef _GLIBCXX_HAVE__FINITEF */
/* Define to 1 if you have the `_finitel' function. */
/* #undef _GLIBCXX_HAVE__FINITEL */
/* Define to 1 if you have the `_floorf' function. */
/* #undef _GLIBCXX_HAVE__FLOORF */
/* Define to 1 if you have the `_floorl' function. */
/* #undef _GLIBCXX_HAVE__FLOORL */
/* Define to 1 if you have the `_fmodf' function. */
/* #undef _GLIBCXX_HAVE__FMODF */
/* Define to 1 if you have the `_fmodl' function. */
/* #undef _GLIBCXX_HAVE__FMODL */
/* Define to 1 if you have the `_fpclass' function. */
/* #undef _GLIBCXX_HAVE__FPCLASS */
/* Define to 1 if you have the `_frexpf' function. */
/* #undef _GLIBCXX_HAVE__FREXPF */
/* Define to 1 if you have the `_frexpl' function. */
/* #undef _GLIBCXX_HAVE__FREXPL */
/* Define to 1 if you have the `_hypot' function. */
/* #undef _GLIBCXX_HAVE__HYPOT */
/* Define to 1 if you have the `_hypotf' function. */
/* #undef _GLIBCXX_HAVE__HYPOTF */
/* Define to 1 if you have the `_hypotl' function. */
/* #undef _GLIBCXX_HAVE__HYPOTL */
/* Define to 1 if you have the `_isinf' function. */
/* #undef _GLIBCXX_HAVE__ISINF */
/* Define to 1 if you have the `_isinff' function. */
/* #undef _GLIBCXX_HAVE__ISINFF */
/* Define to 1 if you have the `_isinfl' function. */
/* #undef _GLIBCXX_HAVE__ISINFL */
/* Define to 1 if you have the `_isnan' function. */
/* #undef _GLIBCXX_HAVE__ISNAN */
/* Define to 1 if you have the `_isnanf' function. */
/* #undef _GLIBCXX_HAVE__ISNANF */
/* Define to 1 if you have the `_isnanl' function. */
/* #undef _GLIBCXX_HAVE__ISNANL */
/* Define to 1 if you have the `_ldexpf' function. */
/* #undef _GLIBCXX_HAVE__LDEXPF */
/* Define to 1 if you have the `_ldexpl' function. */
/* #undef _GLIBCXX_HAVE__LDEXPL */
/* Define to 1 if you have the `_log10f' function. */
/* #undef _GLIBCXX_HAVE__LOG10F */
/* Define to 1 if you have the `_log10l' function. */
/* #undef _GLIBCXX_HAVE__LOG10L */
/* Define to 1 if you have the `_logf' function. */
/* #undef _GLIBCXX_HAVE__LOGF */
/* Define to 1 if you have the `_logl' function. */
/* #undef _GLIBCXX_HAVE__LOGL */
/* Define to 1 if you have the `_modf' function. */
/* #undef _GLIBCXX_HAVE__MODF */
/* Define to 1 if you have the `_modff' function. */
/* #undef _GLIBCXX_HAVE__MODFF */
/* Define to 1 if you have the `_modfl' function. */
/* #undef _GLIBCXX_HAVE__MODFL */
/* Define to 1 if you have the `_powf' function. */
/* #undef _GLIBCXX_HAVE__POWF */
/* Define to 1 if you have the `_powl' function. */
/* #undef _GLIBCXX_HAVE__POWL */
/* Define to 1 if you have the `_qfpclass' function. */
/* #undef _GLIBCXX_HAVE__QFPCLASS */
/* Define to 1 if you have the `_sincos' function. */
/* #undef _GLIBCXX_HAVE__SINCOS */
/* Define to 1 if you have the `_sincosf' function. */
/* #undef _GLIBCXX_HAVE__SINCOSF */
/* Define to 1 if you have the `_sincosl' function. */
/* #undef _GLIBCXX_HAVE__SINCOSL */
/* Define to 1 if you have the `_sinf' function. */
/* #undef _GLIBCXX_HAVE__SINF */
/* Define to 1 if you have the `_sinhf' function. */
/* #undef _GLIBCXX_HAVE__SINHF */
/* Define to 1 if you have the `_sinhl' function. */
/* #undef _GLIBCXX_HAVE__SINHL */
/* Define to 1 if you have the `_sinl' function. */
/* #undef _GLIBCXX_HAVE__SINL */
/* Define to 1 if you have the `_sqrtf' function. */
/* #undef _GLIBCXX_HAVE__SQRTF */
/* Define to 1 if you have the `_sqrtl' function. */
/* #undef _GLIBCXX_HAVE__SQRTL */
/* Define to 1 if you have the `_tanf' function. */
/* #undef _GLIBCXX_HAVE__TANF */
/* Define to 1 if you have the `_tanhf' function. */
/* #undef _GLIBCXX_HAVE__TANHF */
/* Define to 1 if you have the `_tanhl' function. */
/* #undef _GLIBCXX_HAVE__TANHL */
/* Define to 1 if you have the `_tanl' function. */
/* #undef _GLIBCXX_HAVE__TANL */
/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */
#define _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL 1
/* Define as const if the declaration of iconv() needs const. */
#define _GLIBCXX_ICONV_CONST
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
/* #undef _GLIBCXX_PACKAGE */
/* Define to the address where bug reports for this package should be sent. */
#define _GLIBCXX_PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define _GLIBCXX_PACKAGE_NAME "package-unused"
/* Define to the full name and version of this package. */
#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
/* Define to the one symbol short name of this package. */
#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
/* Define to the home page for this package. */
#define _GLIBCXX_PACKAGE_URL ""
/* Define to the version of this package. */
#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
/* The size of `char', as computed by sizeof. */
/* #undef SIZEOF_CHAR */
/* The size of `int', as computed by sizeof. */
/* #undef SIZEOF_INT */
/* The size of `long', as computed by sizeof. */
/* #undef SIZEOF_LONG */
/* The size of `short', as computed by sizeof. */
/* #undef SIZEOF_SHORT */
/* The size of `void *', as computed by sizeof. */
/* #undef SIZEOF_VOID_P */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
/* #undef _GLIBCXX_VERSION */
/* Define if the compiler supports C++11 atomics. */
#define _GLIBCXX_ATOMIC_BUILTINS 1
/* Define to use concept checking code from the boost libraries. */
/* #undef _GLIBCXX_CONCEPT_CHECKS */
/* Define to 1 if a fully dynamic basic_string is wanted, 0 to disable,
undefined for platform defaults */
#define _GLIBCXX_FULLY_DYNAMIC_STRING 0
/* Define if gthreads library is available. */
#define _GLIBCXX_HAS_GTHREADS 1
/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
#define _GLIBCXX_HOSTED 1
/* Define if compatibility should be provided for -mlong-double-64. */
/* Define if ptrdiff_t is int. */
/* #undef _GLIBCXX_PTRDIFF_T_IS_INT */
/* Define if using setrlimit to set resource limits during "make check" */
#define _GLIBCXX_RES_LIMITS 1
/* Define if size_t is unsigned int. */
/* #undef _GLIBCXX_SIZE_T_IS_UINT */
/* Define if the compiler is configured for setjmp/longjmp exceptions. */
/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
/* Define to the value of the EOF integer constant. */
#define _GLIBCXX_STDIO_EOF -1
/* Define to the value of the SEEK_CUR integer constant. */
#define _GLIBCXX_STDIO_SEEK_CUR 1
/* Define to the value of the SEEK_END integer constant. */
#define _GLIBCXX_STDIO_SEEK_END 2
/* Define to use symbol versioning in the shared library. */
#define _GLIBCXX_SYMVER 1
/* Define to use darwin versioning in the shared library. */
/* #undef _GLIBCXX_SYMVER_DARWIN */
/* Define to use GNU versioning in the shared library. */
#define _GLIBCXX_SYMVER_GNU 1
/* Define to use GNU namespace versioning in the shared library. */
/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
/* Define to use Sun versioning in the shared library. */
/* #undef _GLIBCXX_SYMVER_SUN */
/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
<stdio.h>, and <stdlib.h> can be used or exposed. */
#define _GLIBCXX_USE_C99 1
/* Define if C99 functions in <complex.h> should be used in <complex>. Using
compiler builtins for these functions requires corresponding C99 library
functions to be present. */
#define _GLIBCXX_USE_C99_COMPLEX 1
/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
Using compiler builtins for these functions requires corresponding C99
library functions to be present. */
#define _GLIBCXX_USE_C99_COMPLEX_TR1 1
/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
namespace std::tr1. */
#define _GLIBCXX_USE_C99_CTYPE_TR1 1
/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
namespace std::tr1. */
#define _GLIBCXX_USE_C99_FENV_TR1 1
/* Define if C99 functions in <inttypes.h> should be imported in
<tr1/cinttypes> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_INTTYPES_TR1 1
/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
<tr1/cinttypes> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1
/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
in namespace std. */
#define _GLIBCXX_USE_C99_MATH 1
/* Define if C99 functions or macros in <math.h> should be imported in
<tr1/cmath> in namespace std::tr1. */
#define _GLIBCXX_USE_C99_MATH_TR1 1
/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
namespace std::tr1. */
#define _GLIBCXX_USE_C99_STDINT_TR1 1
/* Defined if clock_gettime syscall has monotonic and realtime clock support.
*/
/* #undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL */
/* Defined if clock_gettime has monotonic clock support. */
#define _GLIBCXX_USE_CLOCK_MONOTONIC 1
/* Defined if clock_gettime has realtime clock support. */
#define _GLIBCXX_USE_CLOCK_REALTIME 1
/* Define if ISO/IEC TR 24733 decimal floating point types are supported on
this host. */
#define _GLIBCXX_USE_DECIMAL_FLOAT 1
/* Define if __float128 is supported on this host.
Hide all uses of __float128 from Clang. Google ref b/6422845 */
#ifndef __clang__
#define _GLIBCXX_USE_FLOAT128 1
#endif
# 1301 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
/* Define if fbstring should be used instead of std::string */
#define _GLIBCXX_USE_FB 1
/* Defined if gettimeofday is available. */
#define _GLIBCXX_USE_GETTIMEOFDAY 1
/* Define if get_nprocs is available in <sys/sysinfo.h>. */
#define _GLIBCXX_USE_GET_NPROCS 1
/* Define if __int128 is supported on this host. */
#define _GLIBCXX_USE_INT128 1
/* Define if LFS support is available. */
#define _GLIBCXX_USE_LFS 1
/* Define if code specialized for long long should be used. */
#define _GLIBCXX_USE_LONG_LONG 1
/* Defined if nanosleep is available. */
#define _GLIBCXX_USE_NANOSLEEP 1
/* Define if NLS translations are to be used. */
#define _GLIBCXX_USE_NLS 1
/* Define if pthreads_num_processors_np is available in <pthread.h>. */
/* #undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP */
/* Define if /dev/random and /dev/urandom are available for the random_device
of TR1 (Chapter 5.1). */
#define _GLIBCXX_USE_RANDOM_TR1 1
/* Defined if sched_yield is available. */
#define _GLIBCXX_USE_SCHED_YIELD 1
/* Define if _SC_NPROCESSORS_ONLN is available in <unistd.h>. */
#define _GLIBCXX_USE_SC_NPROCESSORS_ONLN 1
/* Define if _SC_NPROC_ONLN is available in <unistd.h>. */
/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */
/* Define if sysctl(), CTL_HW and HW_NCPU are available in <sys/sysctl.h>. */
/* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */
/* Define if obsolescent tmpnam is available in <stdio.h>. */
#define _GLIBCXX_USE_TMPNAM 1
/* Define if code specialized for wchar_t should be used. */
#define _GLIBCXX_USE_WCHAR_T 1
/* Define to 1 if a verbose library is built, or 0 otherwise. */
#define _GLIBCXX_VERBOSE 1
/* Defined if as can handle rdrand.
Disable when building with Clang. Google ref b/8680429 */
#ifndef __clang__
#define _GLIBCXX_X86_RDRAND 1
#endif
# 1359 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
/* Define to 1 if mutex_timedlock is available. */
#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1
#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
# define _GLIBCXX_HAVE_ACOSF 1
# define acosf _acosf
#endif
# 1367 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
# define _GLIBCXX_HAVE_ACOSL 1
# define acosl _acosl
#endif
# 1372 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
# define _GLIBCXX_HAVE_ASINF 1
# define asinf _asinf
#endif
# 1377 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
# define _GLIBCXX_HAVE_ASINL 1
# define asinl _asinl
#endif
# 1382 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
# define _GLIBCXX_HAVE_ATAN2F 1
# define atan2f _atan2f
#endif
# 1387 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
# define _GLIBCXX_HAVE_ATAN2L 1
# define atan2l _atan2l
#endif
# 1392 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
# define _GLIBCXX_HAVE_ATANF 1
# define atanf _atanf
#endif
# 1397 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
# define _GLIBCXX_HAVE_ATANL 1
# define atanl _atanl
#endif
# 1402 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
# define _GLIBCXX_HAVE_CEILF 1
# define ceilf _ceilf
#endif
# 1407 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
# define _GLIBCXX_HAVE_CEILL 1
# define ceill _ceill
#endif
# 1412 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
# define _GLIBCXX_HAVE_COSF 1
# define cosf _cosf
#endif
# 1417 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
# define _GLIBCXX_HAVE_COSHF 1
# define coshf _coshf
#endif
# 1422 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
# define _GLIBCXX_HAVE_COSHL 1
# define coshl _coshl
#endif
# 1427 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
# define _GLIBCXX_HAVE_COSL 1
# define cosl _cosl
#endif
# 1432 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
# define _GLIBCXX_HAVE_EXPF 1
# define expf _expf
#endif
# 1437 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
# define _GLIBCXX_HAVE_EXPL 1
# define expl _expl
#endif
# 1442 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
# define _GLIBCXX_HAVE_FABSF 1
# define fabsf _fabsf
#endif
# 1447 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
# define _GLIBCXX_HAVE_FABSL 1
# define fabsl _fabsl
#endif
# 1452 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
# define _GLIBCXX_HAVE_FINITE 1
# define finite _finite
#endif
# 1457 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
# define _GLIBCXX_HAVE_FINITEF 1
# define finitef _finitef
#endif
# 1462 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
# define _GLIBCXX_HAVE_FINITEL 1
# define finitel _finitel
#endif
# 1467 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
# define _GLIBCXX_HAVE_FLOORF 1
# define floorf _floorf
#endif
# 1472 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
# define _GLIBCXX_HAVE_FLOORL 1
# define floorl _floorl
#endif
# 1477 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
# define _GLIBCXX_HAVE_FMODF 1
# define fmodf _fmodf
#endif
# 1482 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
# define _GLIBCXX_HAVE_FMODL 1
# define fmodl _fmodl
#endif
# 1487 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
# define _GLIBCXX_HAVE_FPCLASS 1
# define fpclass _fpclass
#endif
# 1492 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
# define _GLIBCXX_HAVE_FREXPF 1
# define frexpf _frexpf
#endif
# 1497 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
# define _GLIBCXX_HAVE_FREXPL 1
# define frexpl _frexpl
#endif
# 1502 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
# define _GLIBCXX_HAVE_HYPOT 1
# define hypot _hypot
#endif
# 1507 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
# define _GLIBCXX_HAVE_HYPOTF 1
# define hypotf _hypotf
#endif
# 1512 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
# define _GLIBCXX_HAVE_HYPOTL 1
# define hypotl _hypotl
#endif
# 1517 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
# define _GLIBCXX_HAVE_ISINF 1
# define isinf _isinf
#endif
# 1522 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
# define _GLIBCXX_HAVE_ISINFF 1
# define isinff _isinff
#endif
# 1527 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
# define _GLIBCXX_HAVE_ISINFL 1
# define isinfl _isinfl
#endif
# 1532 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
# define _GLIBCXX_HAVE_ISNAN 1
# define isnan _isnan
#endif
# 1537 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
# define _GLIBCXX_HAVE_ISNANF 1
# define isnanf _isnanf
#endif
# 1542 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
# define _GLIBCXX_HAVE_ISNANL 1
# define isnanl _isnanl
#endif
# 1547 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
# define _GLIBCXX_HAVE_LDEXPF 1
# define ldexpf _ldexpf
#endif
# 1552 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
# define _GLIBCXX_HAVE_LDEXPL 1
# define ldexpl _ldexpl
#endif
# 1557 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
# define _GLIBCXX_HAVE_LOG10F 1
# define log10f _log10f
#endif
# 1562 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
# define _GLIBCXX_HAVE_LOG10L 1
# define log10l _log10l
#endif
# 1567 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
# define _GLIBCXX_HAVE_LOGF 1
# define logf _logf
#endif
# 1572 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
# define _GLIBCXX_HAVE_LOGL 1
# define logl _logl
#endif
# 1577 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
# define _GLIBCXX_HAVE_MODF 1
# define modf _modf
#endif
# 1582 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
# define _GLIBCXX_HAVE_MODFF 1
# define modff _modff
#endif
# 1587 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
# define _GLIBCXX_HAVE_MODFL 1
# define modfl _modfl
#endif
# 1592 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
# define _GLIBCXX_HAVE_POWF 1
# define powf _powf
#endif
# 1597 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
# define _GLIBCXX_HAVE_POWL 1
# define powl _powl
#endif
# 1602 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
# define _GLIBCXX_HAVE_QFPCLASS 1
# define qfpclass _qfpclass
#endif
# 1607 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
# define _GLIBCXX_HAVE_SINCOS 1
# define sincos _sincos
#endif
# 1612 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
# define _GLIBCXX_HAVE_SINCOSF 1
# define sincosf _sincosf
#endif
# 1617 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
# define _GLIBCXX_HAVE_SINCOSL 1
# define sincosl _sincosl
#endif
# 1622 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
# define _GLIBCXX_HAVE_SINF 1
# define sinf _sinf
#endif
# 1627 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
# define _GLIBCXX_HAVE_SINHF 1
# define sinhf _sinhf
#endif
# 1632 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
# define _GLIBCXX_HAVE_SINHL 1
# define sinhl _sinhl
#endif
# 1637 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
# define _GLIBCXX_HAVE_SINL 1
# define sinl _sinl
#endif
# 1642 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
# define _GLIBCXX_HAVE_SQRTF 1
# define sqrtf _sqrtf
#endif
# 1647 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
# define _GLIBCXX_HAVE_SQRTL 1
# define sqrtl _sqrtl
#endif
# 1652 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
# define _GLIBCXX_HAVE_STRTOF 1
# define strtof _strtof
#endif
# 1657 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
# define _GLIBCXX_HAVE_STRTOLD 1
# define strtold _strtold
#endif
# 1662 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
# define _GLIBCXX_HAVE_TANF 1
# define tanf _tanf
#endif
# 1667 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
# define _GLIBCXX_HAVE_TANHF 1
# define tanhf _tanhf
#endif
# 1672 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
# define _GLIBCXX_HAVE_TANHL 1
# define tanhl _tanhl
#endif
# 1677 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
# define _GLIBCXX_HAVE_TANL 1
# define tanl _tanl
#endif
# 1682 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
#endif // _GLIBCXX_CXX_CONFIG_H
# 1684 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++config.h" 3
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/functexcept.h>
#endif /* expanded by -frewrite-includes */
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/functexcept.h" 1 3
// Function-Based Exception Support -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/functexcept.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{exception}
*
* This header provides support for -fno-exceptions.
*/
//
// ISO C++ 14882: 19.1 Exception classes
//
#ifndef _FUNCTEXCEPT_H
#define _FUNCTEXCEPT_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/functexcept.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/functexcept.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/exception_defines.h>
#endif /* expanded by -frewrite-includes */
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/functexcept.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_defines.h" 1 3
// -fno-exceptions Support -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/exception_defines.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{exception}
*/
#ifndef _EXCEPTION_DEFINES_H
#define _EXCEPTION_DEFINES_H 1
#ifndef __EXCEPTIONS
// Iff -fno-exceptions, transform error handling code to work without it.
# define __try if (true)
# define __catch(X) if (false)
# define __throw_exception_again
#else
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_defines.h" 3
// Else proceed normally.
# define __try try
# define __catch(X) catch(X)
# define __throw_exception_again throw
#endif
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_defines.h" 3
#endif
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_defines.h" 3
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/functexcept.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Helper for exception objects in <except>
void
__throw_bad_exception(void) __attribute__((__noreturn__));
// Helper for exception objects in <new>
void
__throw_bad_alloc(void) __attribute__((__noreturn__));
// Helper for exception objects in <typeinfo>
void
__throw_bad_cast(void) __attribute__((__noreturn__));
void
__throw_bad_typeid(void) __attribute__((__noreturn__));
// Helpers for exception objects in <stdexcept>
void
__throw_logic_error(const char*) __attribute__((__noreturn__));
void
__throw_domain_error(const char*) __attribute__((__noreturn__));
void
__throw_invalid_argument(const char*) __attribute__((__noreturn__));
void
__throw_length_error(const char*) __attribute__((__noreturn__));
void
__throw_out_of_range(const char*) __attribute__((__noreturn__));
void
__throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__))
__attribute__((__format__(__printf__, 1, 2)));
void
__throw_runtime_error(const char*) __attribute__((__noreturn__));
void
__throw_range_error(const char*) __attribute__((__noreturn__));
void
__throw_overflow_error(const char*) __attribute__((__noreturn__));
void
__throw_underflow_error(const char*) __attribute__((__noreturn__));
// Helpers for exception objects in <ios>
void
__throw_ios_failure(const char*) __attribute__((__noreturn__));
void
__throw_system_error(int) __attribute__((__noreturn__));
void
__throw_future_error(int) __attribute__((__noreturn__));
// Helpers for exception objects in <functional>
void
__throw_bad_function_call() __attribute__((__noreturn__));
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 111 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/functexcept.h" 3
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/cpp_type_traits.h>
#endif /* expanded by -frewrite-includes */
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 1 3
// The -*- C++ -*- type traits classes for internal use in libstdc++
// Copyright (C) 2000-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/cpp_type_traits.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{ext/type_traits}
*/
// Written by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
#ifndef _CPP_TYPE_TRAITS_H
#define _CPP_TYPE_TRAITS_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
//
// This file provides some compile-time information about various types.
// These representations were designed, on purpose, to be constant-expressions
// and not types as found in <bits/type_traits.h>. In particular, they
// can be used in control structures and the optimizer hopefully will do
// the obvious thing.
//
// Why integral expressions, and not functions nor types?
// Firstly, these compile-time entities are used as template-arguments
// so function return values won't work: We need compile-time entities.
// We're left with types and constant integral expressions.
// Secondly, from the point of view of ease of use, type-based compile-time
// information is -not- *that* convenient. On has to write lots of
// overloaded functions and to hope that the compiler will select the right
// one. As a net effect, the overall structure isn't very clear at first
// glance.
// Thirdly, partial ordering and overload resolution (of function templates)
// is highly costly in terms of compiler-resource. It is a Good Thing to
// keep these resource consumption as least as possible.
//
// See valarray_array.h for a case use.
//
// -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06.
//
// Update 2005: types are also provided and <bits/type_traits.h> has been
// removed.
//
// Forward declaration hack, should really include this from somewhere.
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Iterator, typename _Container>
class __normal_iterator;
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __true_type { };
struct __false_type { };
template<bool>
struct __truth_type
{ typedef __false_type __type; };
template<>
struct __truth_type<true>
{ typedef __true_type __type; };
// N.B. The conversions to bool are needed due to the issue
// explained in c++/19404.
template<class _Sp, class _Tp>
struct __traitor
{
enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
typedef typename __truth_type<__value>::__type __type;
};
// Compare for equality of types.
template<typename, typename>
struct __are_same
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __are_same<_Tp, _Tp>
{
enum { __value = 1 };
typedef __true_type __type;
};
// Holds if the template-argument is a void type.
template<typename _Tp>
struct __is_void
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_void<void>
{
enum { __value = 1 };
typedef __true_type __type;
};
//
// Integer types
//
template<typename _Tp>
struct __is_integer
{
enum { __value = 0 };
typedef __false_type __type;
};
// Thirteen specializations (yes there are eleven standard integer
// types; <em>long long</em> and <em>unsigned long long</em> are
// supported as extensions)
template<>
struct __is_integer<bool>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
# ifdef _GLIBCXX_USE_WCHAR_T
template<>
struct __is_integer<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
# endif
# 181 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
#if __cplusplus >= 201103L
template<>
struct __is_integer<char16_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<char32_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
#endif
# 197 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
template<>
struct __is_integer<short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned short>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned int>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_integer<unsigned long long>
{
enum { __value = 1 };
typedef __true_type __type;
};
//
// Floating point types
//
template<typename _Tp>
struct __is_floating
{
enum { __value = 0 };
typedef __false_type __type;
};
// three specializations (float, double and 'long double')
template<>
struct __is_floating<float>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<double>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_floating<long double>
{
enum { __value = 1 };
typedef __true_type __type;
};
//
// Pointer types
//
template<typename _Tp>
struct __is_pointer
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __is_pointer<_Tp*>
{
enum { __value = 1 };
typedef __true_type __type;
};
//
// Normal iterator type
//
template<typename _Tp>
struct __is_normal_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Iterator, typename _Container>
struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
_Container> >
{
enum { __value = 1 };
typedef __true_type __type;
};
//
// An arithmetic type is an integer type or a floating point type
//
template<typename _Tp>
struct __is_arithmetic
: public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
{ };
//
// A scalar type is an arithmetic type or a pointer type
//
template<typename _Tp>
struct __is_scalar
: public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
{ };
//
// For use in std::copy and std::find overloads for streambuf iterators.
//
template<typename _Tp>
struct __is_char
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_char<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
struct __is_char<wchar_t>
{
enum { __value = 1 };
typedef __true_type __type;
};
#endif
# 362 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
template<typename _Tp>
struct __is_byte
{
enum { __value = 0 };
typedef __false_type __type;
};
template<>
struct __is_byte<char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<signed char>
{
enum { __value = 1 };
typedef __true_type __type;
};
template<>
struct __is_byte<unsigned char>
{
enum { __value = 1 };
typedef __true_type __type;
};
//
// Move iterator type
//
template<typename _Tp>
struct __is_move_iterator
{
enum { __value = 0 };
typedef __false_type __type;
};
#if __cplusplus >= 201103L
template<typename _Iterator>
class move_iterator;
template<typename _Iterator>
struct __is_move_iterator< move_iterator<_Iterator> >
{
enum { __value = 1 };
typedef __true_type __type;
};
#endif
# 412 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif //_CPP_TYPE_TRAITS_H
# 417 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/cpp_type_traits.h" 3
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/type_traits.h>
#endif /* expanded by -frewrite-includes */
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 1 3
// -*- C++ -*-
// Copyright (C) 2005-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
// version.
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/type_traits.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _EXT_TYPE_TRAITS
#define _EXT_TYPE_TRAITS 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/cpp_type_traits.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Define a nested type if some predicate holds.
template<bool, typename>
struct __enable_if
{ };
template<typename _Tp>
struct __enable_if<true, _Tp>
{ typedef _Tp __type; };
// Conditional expression for types. If true, first, if false, second.
template<bool _Cond, typename _Iftrue, typename _Iffalse>
struct __conditional_type
{ typedef _Iftrue __type; };
template<typename _Iftrue, typename _Iffalse>
struct __conditional_type<false, _Iftrue, _Iffalse>
{ typedef _Iffalse __type; };
// Given an integral builtin type, return the corresponding unsigned type.
template<typename _Tp>
struct __add_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __add_unsigned<char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<signed char>
{ typedef unsigned char __type; };
template<>
struct __add_unsigned<short>
{ typedef unsigned short __type; };
template<>
struct __add_unsigned<int>
{ typedef unsigned int __type; };
template<>
struct __add_unsigned<long>
{ typedef unsigned long __type; };
template<>
struct __add_unsigned<long long>
{ typedef unsigned long long __type; };
// Declare but don't define.
template<>
struct __add_unsigned<bool>;
template<>
struct __add_unsigned<wchar_t>;
// Given an integral builtin type, return the corresponding signed type.
template<typename _Tp>
struct __remove_unsigned
{
private:
typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
public:
typedef typename __if_type::__type __type;
};
template<>
struct __remove_unsigned<char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned char>
{ typedef signed char __type; };
template<>
struct __remove_unsigned<unsigned short>
{ typedef short __type; };
template<>
struct __remove_unsigned<unsigned int>
{ typedef int __type; };
template<>
struct __remove_unsigned<unsigned long>
{ typedef long __type; };
template<>
struct __remove_unsigned<unsigned long long>
{ typedef long long __type; };
// Declare but don't define.
template<>
struct __remove_unsigned<bool>;
template<>
struct __remove_unsigned<wchar_t>;
// For use in string and vstring.
template<typename _Type>
inline bool
__is_null_pointer(_Type* __ptr)
{ return __ptr == 0; }
template<typename _Type>
inline bool
__is_null_pointer(_Type)
{ return false; }
#if __cplusplus >= 201103L
inline bool
__is_null_pointer(std::nullptr_t)
{ return true; }
#endif
# 163 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
// For complex and cmath
template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
struct __promote
{ typedef double __type; };
// No nested __type member for non-integer non-floating point types,
// allows this type to be used for SFINAE to constrain overloads in
// <cmath> and <complex> to only the intended types.
template<typename _Tp>
struct __promote<_Tp, false>
{ };
template<>
struct __promote<long double>
{ typedef long double __type; };
template<>
struct __promote<double>
{ typedef double __type; };
template<>
struct __promote<float>
{ typedef float __type; };
template<typename _Tp, typename _Up,
typename _Tp2 = typename __promote<_Tp>::__type,
typename _Up2 = typename __promote<_Up>::__type>
struct __promote_2
{
typedef __typeof__(_Tp2() + _Up2()) __type;
};
template<typename _Tp, typename _Up, typename _Vp,
typename _Tp2 = typename __promote<_Tp>::__type,
typename _Up2 = typename __promote<_Up>::__type,
typename _Vp2 = typename __promote<_Vp>::__type>
struct __promote_3
{
typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type;
};
template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
typename _Tp2 = typename __promote<_Tp>::__type,
typename _Up2 = typename __promote<_Up>::__type,
typename _Vp2 = typename __promote<_Vp>::__type,
typename _Wp2 = typename __promote<_Wp>::__type>
struct __promote_4
{
typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 219 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/type_traits.h" 3
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/numeric_traits.h>
#endif /* expanded by -frewrite-includes */
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 1 3
// -*- C++ -*-
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
// version.
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/numeric_traits.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _EXT_NUMERIC_TRAITS
#define _EXT_NUMERIC_TRAITS 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/cpp_type_traits.h>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/type_traits.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 3
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Compile time constants for builtin types.
// Sadly std::numeric_limits member functions cannot be used for this.
#define __glibcxx_signed(_Tp) ((_Tp)(-1) < 0)
#define __glibcxx_digits(_Tp) \
(sizeof(_Tp) * __CHAR_BIT__ - __glibcxx_signed(_Tp))
#define __glibcxx_min(_Tp) \
(__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)
#define __glibcxx_max(_Tp) \
(__glibcxx_signed(_Tp) ? \
(((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)
template<typename _Value>
struct __numeric_traits_integer
{
// Only integers for initialization of member constant.
static const _Value __min = __glibcxx_min(_Value);
static const _Value __max = __glibcxx_max(_Value);
// NB: these two also available in std::numeric_limits as compile
// time constants, but <limits> is big and we avoid including it.
static const bool __is_signed = __glibcxx_signed(_Value);
static const int __digits = __glibcxx_digits(_Value);
};
template<typename _Value>
const _Value __numeric_traits_integer<_Value>::__min;
template<typename _Value>
const _Value __numeric_traits_integer<_Value>::__max;
template<typename _Value>
const bool __numeric_traits_integer<_Value>::__is_signed;
template<typename _Value>
const int __numeric_traits_integer<_Value>::__digits;
#undef __glibcxx_signed
#undef __glibcxx_digits
#undef __glibcxx_min
#undef __glibcxx_max
#define __glibcxx_floating(_Tp, _Fval, _Dval, _LDval) \
(std::__are_same<_Tp, float>::__value ? _Fval \
: std::__are_same<_Tp, double>::__value ? _Dval : _LDval)
#define __glibcxx_max_digits10(_Tp) \
(2 + __glibcxx_floating(_Tp, __FLT_MANT_DIG__, __DBL_MANT_DIG__, \
__LDBL_MANT_DIG__) * 643L / 2136)
#define __glibcxx_digits10(_Tp) \
__glibcxx_floating(_Tp, __FLT_DIG__, __DBL_DIG__, __LDBL_DIG__)
#define __glibcxx_max_exponent10(_Tp) \
__glibcxx_floating(_Tp, __FLT_MAX_10_EXP__, __DBL_MAX_10_EXP__, \
__LDBL_MAX_10_EXP__)
template<typename _Value>
struct __numeric_traits_floating
{
// Only floating point types. See N1822.
static const int __max_digits10 = __glibcxx_max_digits10(_Value);
// See above comment...
static const bool __is_signed = true;
static const int __digits10 = __glibcxx_digits10(_Value);
static const int __max_exponent10 = __glibcxx_max_exponent10(_Value);
};
template<typename _Value>
const int __numeric_traits_floating<_Value>::__max_digits10;
template<typename _Value>
const bool __numeric_traits_floating<_Value>::__is_signed;
template<typename _Value>
const int __numeric_traits_floating<_Value>::__digits10;
template<typename _Value>
const int __numeric_traits_floating<_Value>::__max_exponent10;
template<typename _Value>
struct __numeric_traits
: public __conditional_type<std::__is_integer<_Value>::__value,
__numeric_traits_integer<_Value>,
__numeric_traits_floating<_Value> >::__type
{ };
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#undef __glibcxx_floating
#undef __glibcxx_max_digits10
#undef __glibcxx_digits10
#undef __glibcxx_max_exponent10
#endif
# 139 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/numeric_traits.h" 3
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_pair.h>
#endif /* expanded by -frewrite-includes */
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 1 3
// Pair implementation -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_pair.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{utility}
*/
#ifndef _STL_PAIR_H
#define _STL_PAIR_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h> // for std::move / std::forward, and std::swap
#endif /* expanded by -frewrite-includes */
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 1 3
// Move, forward and identity for C++0x + swap -*- C++ -*-
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/move.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{utility}
*/
#ifndef _MOVE_H
#define _MOVE_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/concept_check.h>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 1 3
// Concept-checking control -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/concept_check.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iterator}
*/
#ifndef _CONCEPT_CHECK_H
#define _CONCEPT_CHECK_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
// All places in libstdc++-v3 where these are used, or /might/ be used, or
// don't need to be used, or perhaps /should/ be used, are commented with
// "concept requirements" (and maybe some more text). So grep like crazy
// if you're looking for additional places to use these.
// Concept-checking code is off by default unless users turn it on via
// configure options or editing c++config.h.
#ifndef _GLIBCXX_CONCEPT_CHECKS
#define __glibcxx_function_requires(...)
#define __glibcxx_class_requires(_a,_b)
#define __glibcxx_class_requires2(_a,_b,_c)
#define __glibcxx_class_requires3(_a,_b,_c,_d)
#define __glibcxx_class_requires4(_a,_b,_c,_d,_e)
#else // the checks are on
# 54 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/boost_concept_check.h>
#endif /* expanded by -frewrite-includes */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
// Note that the obvious and elegant approach of
//
//#define glibcxx_function_requires(C) debug::function_requires< debug::C >()
//
// won't work due to concept templates with more than one parameter, e.g.,
// BinaryPredicateConcept. The preprocessor tries to split things up on
// the commas in the template argument list. We can't use an inner pair of
// parenthesis to hide the commas, because "debug::(Temp<Foo,Bar>)" isn't
// a valid instantiation pattern. Thus, we steal a feature from C99.
#define __glibcxx_function_requires(...) \
__gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
#define __glibcxx_class_requires(_a,_C) \
_GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C);
#define __glibcxx_class_requires2(_a,_b,_C) \
_GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
#define __glibcxx_class_requires3(_a,_b,_c,_C) \
_GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
#define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \
_GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
#endif // enable/disable
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
#endif // _GLIBCXX_CONCEPT_CHECK
# 81 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/concept_check.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Used, in C++03 mode too, by allocators, etc.
/**
* @brief Same as C++11 std::addressof
* @ingroup utilities
*/
template<typename _Tp>
inline _Tp*
__addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
{
return reinterpret_cast<_Tp*>
(&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <type_traits> // Brings in std::declval too.
#endif /* expanded by -frewrite-includes */
# 57 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 1 3
// C++11 <type_traits> -*- C++ -*-
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file include/type_traits
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_TYPE_TRAITS
#define _GLIBCXX_TYPE_TRAITS 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#if __cplusplus < 201103L
#if 0 /* expanded by -frewrite-includes */
# include <bits/c++0x_warning.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#else
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
# if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__)
namespace std
{
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
}
# else
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#if 0 /* expanded by -frewrite-includes */
# include <cstdint>
#endif /* expanded by -frewrite-includes */
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
# endif
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup metaprogramming Metaprogramming
* @ingroup utilities
*
* Template utilities for compile-time introspection and modification,
* including type classification traits, type property inspection traits
* and type transformation traits.
*
* @{
*/
/// integral_constant
template<typename _Tp, _Tp __v>
struct integral_constant
{
static constexpr _Tp value = __v;
typedef _Tp value_type;
typedef integral_constant<_Tp, __v> type;
constexpr operator value_type() const { return value; }
#if __cplusplus > 201103L
#define __cpp_lib_integral_constant_callable 201304
constexpr value_type operator()() const { return value; }
#endif
# 81 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
};
template<typename _Tp, _Tp __v>
constexpr _Tp integral_constant<_Tp, __v>::value;
/// The type used as a compile-time boolean with true value.
typedef integral_constant<bool, true> true_type;
/// The type used as a compile-time boolean with false value.
typedef integral_constant<bool, false> false_type;
// Meta programming helper types.
template<bool, typename, typename>
struct conditional;
template<typename...>
struct __or_;
template<>
struct __or_<>
: public false_type
{ };
template<typename _B1>
struct __or_<_B1>
: public _B1
{ };
template<typename _B1, typename _B2>
struct __or_<_B1, _B2>
: public conditional<_B1::value, _B1, _B2>::type
{ };
template<typename _B1, typename _B2, typename _B3, typename... _Bn>
struct __or_<_B1, _B2, _B3, _Bn...>
: public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
{ };
template<typename...>
struct __and_;
template<>
struct __and_<>
: public true_type
{ };
template<typename _B1>
struct __and_<_B1>
: public _B1
{ };
template<typename _B1, typename _B2>
struct __and_<_B1, _B2>
: public conditional<_B1::value, _B2, _B1>::type
{ };
template<typename _B1, typename _B2, typename _B3, typename... _Bn>
struct __and_<_B1, _B2, _B3, _Bn...>
: public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
{ };
template<typename _Pp>
struct __not_
: public integral_constant<bool, !_Pp::value>
{ };
// For several sfinae-friendly trait implementations we transport both the
// result information (as the member type) and the failure information (no
// member type). This is very similar to std::enable_if, but we cannot use
// them, because we need to derive from them as an implementation detail.
template<typename _Tp>
struct __success_type
{ typedef _Tp type; };
struct __failure_type
{ };
// Primary type categories.
template<typename>
struct remove_cv;
template<typename>
struct __is_void_helper
: public false_type { };
template<>
struct __is_void_helper<void>
: public true_type { };
/// is_void
template<typename _Tp>
struct is_void
: public __is_void_helper<typename remove_cv<_Tp>::type>::type
{ };
template<typename>
struct __is_integral_helper
: public false_type { };
template<>
struct __is_integral_helper<bool>
: public true_type { };
template<>
struct __is_integral_helper<char>
: public true_type { };
template<>
struct __is_integral_helper<signed char>
: public true_type { };
template<>
struct __is_integral_helper<unsigned char>
: public true_type { };
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
struct __is_integral_helper<wchar_t>
: public true_type { };
#endif
# 204 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
template<>
struct __is_integral_helper<char16_t>
: public true_type { };
template<>
struct __is_integral_helper<char32_t>
: public true_type { };
template<>
struct __is_integral_helper<short>
: public true_type { };
template<>
struct __is_integral_helper<unsigned short>
: public true_type { };
template<>
struct __is_integral_helper<int>
: public true_type { };
template<>
struct __is_integral_helper<unsigned int>
: public true_type { };
template<>
struct __is_integral_helper<long>
: public true_type { };
template<>
struct __is_integral_helper<unsigned long>
: public true_type { };
template<>
struct __is_integral_helper<long long>
: public true_type { };
template<>
struct __is_integral_helper<unsigned long long>
: public true_type { };
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
template<>
struct __is_integral_helper<__int128>
: public true_type { };
template<>
struct __is_integral_helper<unsigned __int128>
: public true_type { };
#endif
# 254 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
/// is_integral
template<typename _Tp>
struct is_integral
: public __is_integral_helper<typename remove_cv<_Tp>::type>::type
{ };
template<typename>
struct __is_floating_point_helper
: public false_type { };
template<>
struct __is_floating_point_helper<float>
: public true_type { };
template<>
struct __is_floating_point_helper<double>
: public true_type { };
template<>
struct __is_floating_point_helper<long double>
: public true_type { };
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && (!defined (__ANDROID__) || !defined(__clang__) || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
template<>
struct __is_floating_point_helper<__float128>
: public true_type { };
#endif
# 282 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
/// is_floating_point
template<typename _Tp>
struct is_floating_point
: public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
{ };
/// is_array
template<typename>
struct is_array
: public false_type { };
template<typename _Tp, std::size_t _Size>
struct is_array<_Tp[_Size]>
: public true_type { };
template<typename _Tp>
struct is_array<_Tp[]>
: public true_type { };
template<typename>
struct __is_pointer_helper
: public false_type { };
template<typename _Tp>
struct __is_pointer_helper<_Tp*>
: public true_type { };
/// is_pointer
template<typename _Tp>
struct is_pointer
: public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
{ };
/// is_lvalue_reference
template<typename>
struct is_lvalue_reference
: public false_type { };
template<typename _Tp>
struct is_lvalue_reference<_Tp&>
: public true_type { };
/// is_rvalue_reference
template<typename>
struct is_rvalue_reference
: public false_type { };
template<typename _Tp>
struct is_rvalue_reference<_Tp&&>
: public true_type { };
template<typename>
struct is_function;
template<typename>
struct __is_member_object_pointer_helper
: public false_type { };
template<typename _Tp, typename _Cp>
struct __is_member_object_pointer_helper<_Tp _Cp::*>
: public integral_constant<bool, !is_function<_Tp>::value> { };
/// is_member_object_pointer
template<typename _Tp>
struct is_member_object_pointer
: public __is_member_object_pointer_helper<
typename remove_cv<_Tp>::type>::type
{ };
template<typename>
struct __is_member_function_pointer_helper
: public false_type { };
template<typename _Tp, typename _Cp>
struct __is_member_function_pointer_helper<_Tp _Cp::*>
: public integral_constant<bool, is_function<_Tp>::value> { };
/// is_member_function_pointer
template<typename _Tp>
struct is_member_function_pointer
: public __is_member_function_pointer_helper<
typename remove_cv<_Tp>::type>::type
{ };
/// is_enum
template<typename _Tp>
struct is_enum
: public integral_constant<bool, __is_enum(_Tp)>
{ };
/// is_union
template<typename _Tp>
struct is_union
: public integral_constant<bool, __is_union(_Tp)>
{ };
/// is_class
template<typename _Tp>
struct is_class
: public integral_constant<bool, __is_class(_Tp)>
{ };
/// is_function
template<typename>
struct is_function
: public false_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...)>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......)>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) volatile &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) volatile &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...) const volatile &&>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const volatile>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const volatile &>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......) const volatile &&>
: public true_type { };
#define __cpp_lib_is_null_pointer 201309
template<typename>
struct __is_null_pointer_helper
: public false_type { };
template<>
struct __is_null_pointer_helper<std::nullptr_t>
: public true_type { };
/// is_null_pointer (LWG 2247).
template<typename _Tp>
struct is_null_pointer
: public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
{ };
/// __is_nullptr_t (extension).
template<typename _Tp>
struct __is_nullptr_t
: public is_null_pointer<_Tp>
{ };
// Composite type categories.
/// is_reference
template<typename _Tp>
struct is_reference
: public __or_<is_lvalue_reference<_Tp>,
is_rvalue_reference<_Tp>>::type
{ };
/// is_arithmetic
template<typename _Tp>
struct is_arithmetic
: public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
{ };
/// is_fundamental
template<typename _Tp>
struct is_fundamental
: public __or_<is_arithmetic<_Tp>, is_void<_Tp>,
is_null_pointer<_Tp>>::type
{ };
/// is_object
template<typename _Tp>
struct is_object
: public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
is_void<_Tp>>>::type
{ };
template<typename>
struct is_member_pointer;
/// is_scalar
template<typename _Tp>
struct is_scalar
: public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
{ };
/// is_compound
template<typename _Tp>
struct is_compound
: public integral_constant<bool, !is_fundamental<_Tp>::value> { };
template<typename _Tp>
struct __is_member_pointer_helper
: public false_type { };
template<typename _Tp, typename _Cp>
struct __is_member_pointer_helper<_Tp _Cp::*>
: public true_type { };
/// is_member_pointer
template<typename _Tp>
struct is_member_pointer
: public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
{ };
// Utility to detect referenceable types ([defns.referenceable]).
template<typename _Tp>
struct __is_referenceable
: public __or_<is_object<_Tp>, is_reference<_Tp>>::type
{ };
template<typename _Res, typename... _Args>
struct __is_referenceable<_Res(_Args...)>
: public true_type
{ };
template<typename _Res, typename... _Args>
struct __is_referenceable<_Res(_Args......)>
: public true_type
{ };
// Type properties.
/// is_const
template<typename>
struct is_const
: public false_type { };
template<typename _Tp>
struct is_const<_Tp const>
: public true_type { };
/// is_volatile
template<typename>
struct is_volatile
: public false_type { };
template<typename _Tp>
struct is_volatile<_Tp volatile>
: public true_type { };
/// is_trivial
template<typename _Tp>
struct is_trivial
: public integral_constant<bool, __is_trivial(_Tp)>
{ };
// is_trivially_copyable (still unimplemented)
/// is_standard_layout
template<typename _Tp>
struct is_standard_layout
: public integral_constant<bool, __is_standard_layout(_Tp)>
{ };
/// is_pod
// Could use is_standard_layout && is_trivial instead of the builtin.
template<typename _Tp>
struct is_pod
: public integral_constant<bool, __is_pod(_Tp)>
{ };
/// is_literal_type
template<typename _Tp>
struct is_literal_type
: public integral_constant<bool, __is_literal_type(_Tp)>
{ };
/// is_empty
template<typename _Tp>
struct is_empty
: public integral_constant<bool, __is_empty(_Tp)>
{ };
/// is_polymorphic
template<typename _Tp>
struct is_polymorphic
: public integral_constant<bool, __is_polymorphic(_Tp)>
{ };
#if __cplusplus > 201103L
/// is_final
#define __cpp_lib_is_final 201402L
template<typename _Tp>
struct is_final
: public integral_constant<bool, __is_final(_Tp)>
{ };
#endif
# 650 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
/// is_abstract
template<typename _Tp>
struct is_abstract
: public integral_constant<bool, __is_abstract(_Tp)>
{ };
template<typename _Tp,
bool = is_arithmetic<_Tp>::value>
struct __is_signed_helper
: public false_type { };
template<typename _Tp>
struct __is_signed_helper<_Tp, true>
: public integral_constant<bool, _Tp(-1) < _Tp(0)>
{ };
/// is_signed
template<typename _Tp>
struct is_signed
: public __is_signed_helper<_Tp>::type
{ };
/// is_unsigned
template<typename _Tp>
struct is_unsigned
: public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
{ };
// Destructible and constructible type properties.
template<typename>
struct add_rvalue_reference;
/**
* @brief Utility to simplify expressions used in unevaluated operands
* @ingroup utilities
*/
template<typename _Tp>
_Tp&& __declval(int);
template<typename _Tp>
_Tp __declval(long);
template<typename _Tp>
decltype(__declval<_Tp>(0)) declval() noexcept;
template<typename, unsigned = 0>
struct extent;
template<typename>
struct remove_all_extents;
template<typename _Tp>
struct __is_array_known_bounds
: public integral_constant<bool, (extent<_Tp>::value > 0)>
{ };
template<typename _Tp>
struct __is_array_unknown_bounds
: public __and_<is_array<_Tp>, __not_<extent<_Tp>>>::type
{ };
// In N3290 is_destructible does not say anything about function
// types and abstract types, see LWG 2049. This implementation
// describes function types as non-destructible and all complete
// object types as destructible, iff the explicit destructor
// call expression is wellformed.
struct __do_is_destructible_impl
{
template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())>
static true_type __test(int);
template<typename>
static false_type __test(...);
};
template<typename _Tp>
struct __is_destructible_impl
: public __do_is_destructible_impl
{
typedef decltype(__test<_Tp>(0)) type;
};
template<typename _Tp,
bool = __or_<is_void<_Tp>,
__is_array_unknown_bounds<_Tp>,
is_function<_Tp>>::value,
bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value>
struct __is_destructible_safe;
template<typename _Tp>
struct __is_destructible_safe<_Tp, false, false>
: public __is_destructible_impl<typename
remove_all_extents<_Tp>::type>::type
{ };
template<typename _Tp>
struct __is_destructible_safe<_Tp, true, false>
: public false_type { };
template<typename _Tp>
struct __is_destructible_safe<_Tp, false, true>
: public true_type { };
/// is_destructible
template<typename _Tp>
struct is_destructible
: public __is_destructible_safe<_Tp>::type
{ };
// is_nothrow_destructible requires that is_destructible is
// satisfied as well. We realize that by mimicing the
// implementation of is_destructible but refer to noexcept(expr)
// instead of decltype(expr).
struct __do_is_nt_destructible_impl
{
template<typename _Tp>
static integral_constant<bool, noexcept(declval<_Tp&>().~_Tp())>
__test(int);
template<typename>
static false_type __test(...);
};
template<typename _Tp>
struct __is_nt_destructible_impl
: public __do_is_nt_destructible_impl
{
typedef decltype(__test<_Tp>(0)) type;
};
template<typename _Tp,
bool = __or_<is_void<_Tp>,
__is_array_unknown_bounds<_Tp>,
is_function<_Tp>>::value,
bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value>
struct __is_nt_destructible_safe;
template<typename _Tp>
struct __is_nt_destructible_safe<_Tp, false, false>
: public __is_nt_destructible_impl<typename
remove_all_extents<_Tp>::type>::type
{ };
template<typename _Tp>
struct __is_nt_destructible_safe<_Tp, true, false>
: public false_type { };
template<typename _Tp>
struct __is_nt_destructible_safe<_Tp, false, true>
: public true_type { };
/// is_nothrow_destructible
template<typename _Tp>
struct is_nothrow_destructible
: public __is_nt_destructible_safe<_Tp>::type
{ };
struct __do_is_default_constructible_impl
{
template<typename _Tp, typename = decltype(_Tp())>
static true_type __test(int);
template<typename>
static false_type __test(...);
};
template<typename _Tp>
struct __is_default_constructible_impl
: public __do_is_default_constructible_impl
{
typedef decltype(__test<_Tp>(0)) type;
};
template<typename _Tp>
struct __is_default_constructible_atom
: public __and_<__not_<is_void<_Tp>>,
__is_default_constructible_impl<_Tp>>::type
{ };
template<typename _Tp, bool = is_array<_Tp>::value>
struct __is_default_constructible_safe;
// The following technique is a workaround for a current core language
// restriction, which does not allow for array types to occur in
// functional casts of the form T(). Complete arrays can be default-
// constructed, if the element type is default-constructible, but
// arrays with unknown bounds are not.
template<typename _Tp>
struct __is_default_constructible_safe<_Tp, true>
: public __and_<__is_array_known_bounds<_Tp>,
__is_default_constructible_atom<typename
remove_all_extents<_Tp>::type>>::type
{ };
template<typename _Tp>
struct __is_default_constructible_safe<_Tp, false>
: public __is_default_constructible_atom<_Tp>::type
{ };
/// is_default_constructible
template<typename _Tp>
struct is_default_constructible
: public __is_default_constructible_safe<_Tp>::type
{ };
// Implementation of is_constructible.
// The hardest part of this trait is the binary direct-initialization
// case, because we hit into a functional cast of the form T(arg).
// This implementation uses different strategies depending on the
// target type to reduce the test overhead as much as possible:
//
// a) For a reference target type, we use a static_cast expression
// modulo its extra cases.
//
// b) For a non-reference target type we use a ::new expression.
struct __do_is_static_castable_impl
{
template<typename _From, typename _To, typename
= decltype(static_cast<_To>(declval<_From>()))>
static true_type __test(int);
template<typename, typename>
static false_type __test(...);
};
template<typename _From, typename _To>
struct __is_static_castable_impl
: public __do_is_static_castable_impl
{
typedef decltype(__test<_From, _To>(0)) type;
};
template<typename _From, typename _To>
struct __is_static_castable_safe
: public __is_static_castable_impl<_From, _To>::type
{ };
// __is_static_castable
template<typename _From, typename _To>
struct __is_static_castable
: public integral_constant<bool, (__is_static_castable_safe<
_From, _To>::value)>
{ };
// Implementation for non-reference types. To meet the proper
// variable definition semantics, we also need to test for
// is_destructible in this case.
// This form should be simplified by a single expression:
// ::delete ::new _Tp(declval<_Arg>()), see c++/51222.
struct __do_is_direct_constructible_impl
{
template<typename _Tp, typename _Arg, typename
= decltype(::new _Tp(declval<_Arg>()))>
static true_type __test(int);
template<typename, typename>
static false_type __test(...);
};
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_impl
: public __do_is_direct_constructible_impl
{
typedef decltype(__test<_Tp, _Arg>(0)) type;
};
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_new_safe
: public __and_<is_destructible<_Tp>,
__is_direct_constructible_impl<_Tp, _Arg>>::type
{ };
template<typename, typename>
struct is_same;
template<typename, typename>
struct is_base_of;
template<typename>
struct remove_reference;
template<typename _From, typename _To, bool
= __not_<__or_<is_void<_From>,
is_function<_From>>>::value>
struct __is_base_to_derived_ref;
// Detect whether we have a downcast situation during
// reference binding.
template<typename _From, typename _To>
struct __is_base_to_derived_ref<_From, _To, true>
{
typedef typename remove_cv<typename remove_reference<_From
>::type>::type __src_t;
typedef typename remove_cv<typename remove_reference<_To
>::type>::type __dst_t;
typedef __and_<__not_<is_same<__src_t, __dst_t>>,
is_base_of<__src_t, __dst_t>> type;
static constexpr bool value = type::value;
};
template<typename _From, typename _To>
struct __is_base_to_derived_ref<_From, _To, false>
: public false_type
{ };
template<typename _From, typename _To, bool
= __and_<is_lvalue_reference<_From>,
is_rvalue_reference<_To>>::value>
struct __is_lvalue_to_rvalue_ref;
// Detect whether we have an lvalue of non-function type
// bound to a reference-compatible rvalue-reference.
template<typename _From, typename _To>
struct __is_lvalue_to_rvalue_ref<_From, _To, true>
{
typedef typename remove_cv<typename remove_reference<
_From>::type>::type __src_t;
typedef typename remove_cv<typename remove_reference<
_To>::type>::type __dst_t;
typedef __and_<__not_<is_function<__src_t>>,
__or_<is_same<__src_t, __dst_t>,
is_base_of<__dst_t, __src_t>>> type;
static constexpr bool value = type::value;
};
template<typename _From, typename _To>
struct __is_lvalue_to_rvalue_ref<_From, _To, false>
: public false_type
{ };
// Here we handle direct-initialization to a reference type as
// equivalent to a static_cast modulo overshooting conversions.
// These are restricted to the following conversions:
// a) A base class value to a derived class reference
// b) An lvalue to an rvalue-reference of reference-compatible
// types that are not functions
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_ref_cast
: public __and_<__is_static_castable<_Arg, _Tp>,
__not_<__or_<__is_base_to_derived_ref<_Arg, _Tp>,
__is_lvalue_to_rvalue_ref<_Arg, _Tp>
>>>::type
{ };
template<typename _Tp, typename _Arg>
struct __is_direct_constructible_new
: public conditional<is_reference<_Tp>::value,
__is_direct_constructible_ref_cast<_Tp, _Arg>,
__is_direct_constructible_new_safe<_Tp, _Arg>
>::type
{ };
template<typename _Tp, typename _Arg>
struct __is_direct_constructible
: public __is_direct_constructible_new<_Tp, _Arg>::type
{ };
// Since default-construction and binary direct-initialization have
// been handled separately, the implementation of the remaining
// n-ary construction cases is rather straightforward. We can use
// here a functional cast, because array types are excluded anyway
// and this form is never interpreted as a C cast.
struct __do_is_nary_constructible_impl
{
template<typename _Tp, typename... _Args, typename
= decltype(_Tp(declval<_Args>()...))>
static true_type __test(int);
template<typename, typename...>
static false_type __test(...);
};
template<typename _Tp, typename... _Args>
struct __is_nary_constructible_impl
: public __do_is_nary_constructible_impl
{
typedef decltype(__test<_Tp, _Args...>(0)) type;
};
template<typename _Tp, typename... _Args>
struct __is_nary_constructible
: public __is_nary_constructible_impl<_Tp, _Args...>::type
{
static_assert(sizeof...(_Args) > 1,
"Only useful for > 1 arguments");
};
template<typename _Tp, typename... _Args>
struct __is_constructible_impl
: public __is_nary_constructible<_Tp, _Args...>
{ };
template<typename _Tp, typename _Arg>
struct __is_constructible_impl<_Tp, _Arg>
: public __is_direct_constructible<_Tp, _Arg>
{ };
template<typename _Tp>
struct __is_constructible_impl<_Tp>
: public is_default_constructible<_Tp>
{ };
/// is_constructible
template<typename _Tp, typename... _Args>
struct is_constructible
: public __is_constructible_impl<_Tp, _Args...>::type
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_copy_constructible_impl;
template<typename _Tp>
struct __is_copy_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_copy_constructible_impl<_Tp, true>
: public is_constructible<_Tp, const _Tp&>
{ };
/// is_copy_constructible
template<typename _Tp>
struct is_copy_constructible
: public __is_copy_constructible_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_move_constructible_impl;
template<typename _Tp>
struct __is_move_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_move_constructible_impl<_Tp, true>
: public is_constructible<_Tp, _Tp&&>
{ };
/// is_move_constructible
template<typename _Tp>
struct is_move_constructible
: public __is_move_constructible_impl<_Tp>
{ };
template<typename _Tp>
struct __is_nt_default_constructible_atom
: public integral_constant<bool, noexcept(_Tp())>
{ };
template<typename _Tp, bool = is_array<_Tp>::value>
struct __is_nt_default_constructible_impl;
template<typename _Tp>
struct __is_nt_default_constructible_impl<_Tp, true>
: public __and_<__is_array_known_bounds<_Tp>,
__is_nt_default_constructible_atom<typename
remove_all_extents<_Tp>::type>>::type
{ };
template<typename _Tp>
struct __is_nt_default_constructible_impl<_Tp, false>
: public __is_nt_default_constructible_atom<_Tp>
{ };
/// is_nothrow_default_constructible
template<typename _Tp>
struct is_nothrow_default_constructible
: public __and_<is_default_constructible<_Tp>,
__is_nt_default_constructible_impl<_Tp>>::type
{ };
template<typename _Tp, typename... _Args>
struct __is_nt_constructible_impl
: public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))>
{ };
template<typename _Tp, typename _Arg>
struct __is_nt_constructible_impl<_Tp, _Arg>
: public integral_constant<bool,
noexcept(static_cast<_Tp>(declval<_Arg>()))>
{ };
template<typename _Tp>
struct __is_nt_constructible_impl<_Tp>
: public is_nothrow_default_constructible<_Tp>
{ };
/// is_nothrow_constructible
template<typename _Tp, typename... _Args>
struct is_nothrow_constructible
: public __and_<is_constructible<_Tp, _Args...>,
__is_nt_constructible_impl<_Tp, _Args...>>::type
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nothrow_copy_constructible_impl;
template<typename _Tp>
struct __is_nothrow_copy_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nothrow_copy_constructible_impl<_Tp, true>
: public is_nothrow_constructible<_Tp, const _Tp&>
{ };
/// is_nothrow_copy_constructible
template<typename _Tp>
struct is_nothrow_copy_constructible
: public __is_nothrow_copy_constructible_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nothrow_move_constructible_impl;
template<typename _Tp>
struct __is_nothrow_move_constructible_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nothrow_move_constructible_impl<_Tp, true>
: public is_nothrow_constructible<_Tp, _Tp&&>
{ };
/// is_nothrow_move_constructible
template<typename _Tp>
struct is_nothrow_move_constructible
: public __is_nothrow_move_constructible_impl<_Tp>
{ };
template<typename _Tp, typename _Up>
class __is_assignable_helper
{
template<typename _Tp1, typename _Up1,
typename = decltype(declval<_Tp1>() = declval<_Up1>())>
static true_type
__test(int);
template<typename, typename>
static false_type
__test(...);
public:
typedef decltype(__test<_Tp, _Up>(0)) type;
};
/// is_assignable
template<typename _Tp, typename _Up>
struct is_assignable
: public __is_assignable_helper<_Tp, _Up>::type
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_copy_assignable_impl;
template<typename _Tp>
struct __is_copy_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_copy_assignable_impl<_Tp, true>
: public is_assignable<_Tp&, const _Tp&>
{ };
/// is_copy_assignable
template<typename _Tp>
struct is_copy_assignable
: public __is_copy_assignable_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_move_assignable_impl;
template<typename _Tp>
struct __is_move_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_move_assignable_impl<_Tp, true>
: public is_assignable<_Tp&, _Tp&&>
{ };
/// is_move_assignable
template<typename _Tp>
struct is_move_assignable
: public __is_move_assignable_impl<_Tp>
{ };
template<typename _Tp, typename _Up>
struct __is_nt_assignable_impl
: public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Up>())>
{ };
/// is_nothrow_assignable
template<typename _Tp, typename _Up>
struct is_nothrow_assignable
: public __and_<is_assignable<_Tp, _Up>,
__is_nt_assignable_impl<_Tp, _Up>>::type
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nt_copy_assignable_impl;
template<typename _Tp>
struct __is_nt_copy_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nt_copy_assignable_impl<_Tp, true>
: public is_nothrow_assignable<_Tp&, const _Tp&>
{ };
/// is_nothrow_copy_assignable
template<typename _Tp>
struct is_nothrow_copy_assignable
: public __is_nt_copy_assignable_impl<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __is_nt_move_assignable_impl;
template<typename _Tp>
struct __is_nt_move_assignable_impl<_Tp, false>
: public false_type { };
template<typename _Tp>
struct __is_nt_move_assignable_impl<_Tp, true>
: public is_nothrow_assignable<_Tp&, _Tp&&>
{ };
/// is_nothrow_move_assignable
template<typename _Tp>
struct is_nothrow_move_assignable
: public __is_nt_move_assignable_impl<_Tp>
{ };
/// is_trivially_constructible (still unimplemented)
/// is_trivially_default_constructible (still unimplemented)
/// is_trivially_copy_constructible (still unimplemented)
/// is_trivially_move_constructible (still unimplemented)
/// is_trivially_assignable (still unimplemented)
/// is_trivially_copy_assignable (still unimplemented)
/// is_trivially_move_assignable (still unimplemented)
/// is_trivially_destructible
template<typename _Tp>
struct is_trivially_destructible
: public __and_<is_destructible<_Tp>, integral_constant<bool,
__has_trivial_destructor(_Tp)>>::type
{ };
/// has_trivial_default_constructor (temporary legacy)
template<typename _Tp>
struct has_trivial_default_constructor
: public integral_constant<bool, __has_trivial_constructor(_Tp)>
{ };
/// has_trivial_copy_constructor (temporary legacy)
template<typename _Tp>
struct has_trivial_copy_constructor
: public integral_constant<bool, __has_trivial_copy(_Tp)>
{ };
/// has_trivial_copy_assign (temporary legacy)
template<typename _Tp>
struct has_trivial_copy_assign
: public integral_constant<bool, __has_trivial_assign(_Tp)>
{ };
/// has_virtual_destructor
template<typename _Tp>
struct has_virtual_destructor
: public integral_constant<bool, __has_virtual_destructor(_Tp)>
{ };
// type property queries.
/// alignment_of
template<typename _Tp>
struct alignment_of
: public integral_constant<std::size_t, __alignof__(_Tp)> { };
/// rank
template<typename>
struct rank
: public integral_constant<std::size_t, 0> { };
template<typename _Tp, std::size_t _Size>
struct rank<_Tp[_Size]>
: public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
template<typename _Tp>
struct rank<_Tp[]>
: public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
/// extent
template<typename, unsigned _Uint>
struct extent
: public integral_constant<std::size_t, 0> { };
template<typename _Tp, unsigned _Uint, std::size_t _Size>
struct extent<_Tp[_Size], _Uint>
: public integral_constant<std::size_t,
_Uint == 0 ? _Size : extent<_Tp,
_Uint - 1>::value>
{ };
template<typename _Tp, unsigned _Uint>
struct extent<_Tp[], _Uint>
: public integral_constant<std::size_t,
_Uint == 0 ? 0 : extent<_Tp,
_Uint - 1>::value>
{ };
// Type relations.
/// is_same
template<typename, typename>
struct is_same
: public false_type { };
template<typename _Tp>
struct is_same<_Tp, _Tp>
: public true_type { };
/// is_base_of
template<typename _Base, typename _Derived>
struct is_base_of
: public integral_constant<bool, __is_base_of(_Base, _Derived)>
{ };
template<typename _From, typename _To,
bool = __or_<is_void<_From>, is_function<_To>,
is_array<_To>>::value>
struct __is_convertible_helper
{ typedef typename is_void<_To>::type type; };
template<typename _From, typename _To>
class __is_convertible_helper<_From, _To, false>
{
template<typename _To1>
static void __test_aux(_To1);
template<typename _From1, typename _To1,
typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
static true_type
__test(int);
template<typename, typename>
static false_type
__test(...);
public:
typedef decltype(__test<_From, _To>(0)) type;
};
/// is_convertible
template<typename _From, typename _To>
struct is_convertible
: public __is_convertible_helper<_From, _To>::type
{ };
// Const-volatile modifications.
/// remove_const
template<typename _Tp>
struct remove_const
{ typedef _Tp type; };
template<typename _Tp>
struct remove_const<_Tp const>
{ typedef _Tp type; };
/// remove_volatile
template<typename _Tp>
struct remove_volatile
{ typedef _Tp type; };
template<typename _Tp>
struct remove_volatile<_Tp volatile>
{ typedef _Tp type; };
/// remove_cv
template<typename _Tp>
struct remove_cv
{
typedef typename
remove_const<typename remove_volatile<_Tp>::type>::type type;
};
/// add_const
template<typename _Tp>
struct add_const
{ typedef _Tp const type; };
/// add_volatile
template<typename _Tp>
struct add_volatile
{ typedef _Tp volatile type; };
/// add_cv
template<typename _Tp>
struct add_cv
{
typedef typename
add_const<typename add_volatile<_Tp>::type>::type type;
};
#if __cplusplus > 201103L
#define __cpp_lib_transformation_trait_aliases 201304
/// Alias template for remove_const
template<typename _Tp>
using remove_const_t = typename remove_const<_Tp>::type;
/// Alias template for remove_volatile
template<typename _Tp>
using remove_volatile_t = typename remove_volatile<_Tp>::type;
/// Alias template for remove_cv
template<typename _Tp>
using remove_cv_t = typename remove_cv<_Tp>::type;
/// Alias template for add_const
template<typename _Tp>
using add_const_t = typename add_const<_Tp>::type;
/// Alias template for add_volatile
template<typename _Tp>
using add_volatile_t = typename add_volatile<_Tp>::type;
/// Alias template for add_cv
template<typename _Tp>
using add_cv_t = typename add_cv<_Tp>::type;
#endif
# 1499 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
// Reference transformations.
/// remove_reference
template<typename _Tp>
struct remove_reference
{ typedef _Tp type; };
template<typename _Tp>
struct remove_reference<_Tp&>
{ typedef _Tp type; };
template<typename _Tp>
struct remove_reference<_Tp&&>
{ typedef _Tp type; };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __add_lvalue_reference_helper
{ typedef _Tp type; };
template<typename _Tp>
struct __add_lvalue_reference_helper<_Tp, true>
{ typedef _Tp& type; };
/// add_lvalue_reference
template<typename _Tp>
struct add_lvalue_reference
: public __add_lvalue_reference_helper<_Tp>
{ };
template<typename _Tp, bool = __is_referenceable<_Tp>::value>
struct __add_rvalue_reference_helper
{ typedef _Tp type; };
template<typename _Tp>
struct __add_rvalue_reference_helper<_Tp, true>
{ typedef _Tp&& type; };
/// add_rvalue_reference
template<typename _Tp>
struct add_rvalue_reference
: public __add_rvalue_reference_helper<_Tp>
{ };
#if __cplusplus > 201103L
/// Alias template for remove_reference
template<typename _Tp>
using remove_reference_t = typename remove_reference<_Tp>::type;
/// Alias template for add_lvalue_reference
template<typename _Tp>
using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type;
/// Alias template for add_rvalue_reference
template<typename _Tp>
using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
#endif
# 1556 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
// Sign modifications.
// Utility for constructing identically cv-qualified types.
template<typename _Unqualified, bool _IsConst, bool _IsVol>
struct __cv_selector;
template<typename _Unqualified>
struct __cv_selector<_Unqualified, false, false>
{ typedef _Unqualified __type; };
template<typename _Unqualified>
struct __cv_selector<_Unqualified, false, true>
{ typedef volatile _Unqualified __type; };
template<typename _Unqualified>
struct __cv_selector<_Unqualified, true, false>
{ typedef const _Unqualified __type; };
template<typename _Unqualified>
struct __cv_selector<_Unqualified, true, true>
{ typedef const volatile _Unqualified __type; };
template<typename _Qualified, typename _Unqualified,
bool _IsConst = is_const<_Qualified>::value,
bool _IsVol = is_volatile<_Qualified>::value>
class __match_cv_qualifiers
{
typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
public:
typedef typename __match::__type __type;
};
// Utility for finding the unsigned versions of signed integral types.
template<typename _Tp>
struct __make_unsigned
{ typedef _Tp __type; };
template<>
struct __make_unsigned<char>
{ typedef unsigned char __type; };
template<>
struct __make_unsigned<signed char>
{ typedef unsigned char __type; };
template<>
struct __make_unsigned<short>
{ typedef unsigned short __type; };
template<>
struct __make_unsigned<int>
{ typedef unsigned int __type; };
template<>
struct __make_unsigned<long>
{ typedef unsigned long __type; };
template<>
struct __make_unsigned<long long>
{ typedef unsigned long long __type; };
#if defined(_GLIBCXX_USE_WCHAR_T) && !defined(__WCHAR_UNSIGNED__)
template<>
struct __make_unsigned<wchar_t> : __make_unsigned<__WCHAR_TYPE__>
{ };
#endif
# 1624 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
template<>
struct __make_unsigned<__int128>
{ typedef unsigned __int128 __type; };
#endif
# 1630 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
// Select between integral and enum: not possible to be both.
template<typename _Tp,
bool _IsInt = is_integral<_Tp>::value,
bool _IsEnum = is_enum<_Tp>::value>
class __make_unsigned_selector;
template<typename _Tp>
class __make_unsigned_selector<_Tp, true, false>
{
typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
typedef typename __unsignedt::__type __unsigned_type;
typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
public:
typedef typename __cv_unsigned::__type __type;
};
template<typename _Tp>
class __make_unsigned_selector<_Tp, false, true>
{
// With -fshort-enums, an enum may be as small as a char.
typedef unsigned char __smallest;
static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short);
static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int);
typedef conditional<__b2, unsigned int, unsigned long> __cond2;
typedef typename __cond2::type __cond2_type;
typedef conditional<__b1, unsigned short, __cond2_type> __cond1;
typedef typename __cond1::type __cond1_type;
public:
typedef typename conditional<__b0, __smallest, __cond1_type>::type __type;
};
// Given an integral/enum type, return the corresponding unsigned
// integer type.
// Primary template.
/// make_unsigned
template<typename _Tp>
struct make_unsigned
{ typedef typename __make_unsigned_selector<_Tp>::__type type; };
// Integral, but don't define.
template<>
struct make_unsigned<bool>;
// Utility for finding the signed versions of unsigned integral types.
template<typename _Tp>
struct __make_signed
{ typedef _Tp __type; };
template<>
struct __make_signed<char>
{ typedef signed char __type; };
template<>
struct __make_signed<unsigned char>
{ typedef signed char __type; };
template<>
struct __make_signed<unsigned short>
{ typedef signed short __type; };
template<>
struct __make_signed<unsigned int>
{ typedef signed int __type; };
template<>
struct __make_signed<unsigned long>
{ typedef signed long __type; };
template<>
struct __make_signed<unsigned long long>
{ typedef signed long long __type; };
#if defined(_GLIBCXX_USE_WCHAR_T) && defined(__WCHAR_UNSIGNED__)
template<>
struct __make_signed<wchar_t> : __make_signed<__WCHAR_TYPE__>
{ };
#endif
# 1712 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
template<>
struct __make_signed<char16_t> : __make_signed<uint_least16_t>
{ };
template<>
struct __make_signed<char32_t> : __make_signed<uint_least32_t>
{ };
#endif
# 1721 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
template<>
struct __make_signed<unsigned __int128>
{ typedef __int128 __type; };
#endif
# 1727 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
// Select between integral and enum: not possible to be both.
template<typename _Tp,
bool _IsInt = is_integral<_Tp>::value,
bool _IsEnum = is_enum<_Tp>::value>
class __make_signed_selector;
template<typename _Tp>
class __make_signed_selector<_Tp, true, false>
{
typedef __make_signed<typename remove_cv<_Tp>::type> __signedt;
typedef typename __signedt::__type __signed_type;
typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed;
public:
typedef typename __cv_signed::__type __type;
};
template<typename _Tp>
class __make_signed_selector<_Tp, false, true>
{
// With -fshort-enums, an enum may be as small as a char.
typedef signed char __smallest;
static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
static const bool __b1 = sizeof(_Tp) <= sizeof(signed short);
static const bool __b2 = sizeof(_Tp) <= sizeof(signed int);
typedef conditional<__b2, signed int, signed long> __cond2;
typedef typename __cond2::type __cond2_type;
typedef conditional<__b1, signed short, __cond2_type> __cond1;
typedef typename __cond1::type __cond1_type;
public:
typedef typename conditional<__b0, __smallest, __cond1_type>::type __type;
};
// Given an integral/enum type, return the corresponding signed
// integer type.
// Primary template.
/// make_signed
template<typename _Tp>
struct make_signed
{ typedef typename __make_signed_selector<_Tp>::__type type; };
// Integral, but don't define.
template<>
struct make_signed<bool>;
#if __cplusplus > 201103L
/// Alias template for make_signed
template<typename _Tp>
using make_signed_t = typename make_signed<_Tp>::type;
/// Alias template for make_unsigned
template<typename _Tp>
using make_unsigned_t = typename make_unsigned<_Tp>::type;
#endif
# 1783 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
// Array modifications.
/// remove_extent
template<typename _Tp>
struct remove_extent
{ typedef _Tp type; };
template<typename _Tp, std::size_t _Size>
struct remove_extent<_Tp[_Size]>
{ typedef _Tp type; };
template<typename _Tp>
struct remove_extent<_Tp[]>
{ typedef _Tp type; };
/// remove_all_extents
template<typename _Tp>
struct remove_all_extents
{ typedef _Tp type; };
template<typename _Tp, std::size_t _Size>
struct remove_all_extents<_Tp[_Size]>
{ typedef typename remove_all_extents<_Tp>::type type; };
template<typename _Tp>
struct remove_all_extents<_Tp[]>
{ typedef typename remove_all_extents<_Tp>::type type; };
#if __cplusplus > 201103L
/// Alias template for remove_extent
template<typename _Tp>
using remove_extent_t = typename remove_extent<_Tp>::type;
/// Alias template for remove_all_extents
template<typename _Tp>
using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
#endif
# 1821 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
// Pointer modifications.
template<typename _Tp, typename>
struct __remove_pointer_helper
{ typedef _Tp type; };
template<typename _Tp, typename _Up>
struct __remove_pointer_helper<_Tp, _Up*>
{ typedef _Up type; };
/// remove_pointer
template<typename _Tp>
struct remove_pointer
: public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
{ };
/// add_pointer
template<typename _Tp, bool = __or_<__is_referenceable<_Tp>,
is_void<_Tp>>::value>
struct __add_pointer_helper
{ typedef _Tp type; };
template<typename _Tp>
struct __add_pointer_helper<_Tp, true>
{ typedef typename remove_reference<_Tp>::type* type; };
template<typename _Tp>
struct add_pointer
: public __add_pointer_helper<_Tp>
{ };
#if __cplusplus > 201103L
/// Alias template for remove_pointer
template<typename _Tp>
using remove_pointer_t = typename remove_pointer<_Tp>::type;
/// Alias template for add_pointer
template<typename _Tp>
using add_pointer_t = typename add_pointer<_Tp>::type;
#endif
# 1862 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
template<std::size_t _Len>
struct __aligned_storage_msa
{
union __type
{
unsigned char __data[_Len];
struct __attribute__((__aligned__)) { } __align;
};
};
/**
* @brief Alignment type.
*
* The value of _Align is a default-alignment which shall be the
* most stringent alignment requirement for any C++ object type
* whose size is no greater than _Len (3.9). The member typedef
* type shall be a POD type suitable for use as uninitialized
* storage for any object whose size is at most _Len and whose
* alignment is a divisor of _Align.
*/
template<std::size_t _Len, std::size_t _Align =
__alignof__(typename __aligned_storage_msa<_Len>::__type)>
struct aligned_storage
{
union type
{
unsigned char __data[_Len];
struct __attribute__((__aligned__((_Align)))) { } __align;
};
};
// Decay trait for arrays and functions, used for perfect forwarding
// in make_pair, make_tuple, etc.
template<typename _Up,
bool _IsArray = is_array<_Up>::value,
bool _IsFunction = is_function<_Up>::value>
struct __decay_selector;
// NB: DR 705.
template<typename _Up>
struct __decay_selector<_Up, false, false>
{ typedef typename remove_cv<_Up>::type __type; };
template<typename _Up>
struct __decay_selector<_Up, true, false>
{ typedef typename remove_extent<_Up>::type* __type; };
template<typename _Up>
struct __decay_selector<_Up, false, true>
{ typedef typename add_pointer<_Up>::type __type; };
/// decay
template<typename _Tp>
class decay
{
typedef typename remove_reference<_Tp>::type __remove_type;
public:
typedef typename __decay_selector<__remove_type>::__type type;
};
template<typename _Tp>
class reference_wrapper;
// Helper which adds a reference to a type when given a reference_wrapper
template<typename _Tp>
struct __strip_reference_wrapper
{
typedef _Tp __type;
};
template<typename _Tp>
struct __strip_reference_wrapper<reference_wrapper<_Tp> >
{
typedef _Tp& __type;
};
template<typename _Tp>
struct __decay_and_strip
{
typedef typename __strip_reference_wrapper<
typename decay<_Tp>::type>::__type __type;
};
// Primary template.
/// Define a member typedef @c type only if a boolean constant is true.
template<bool, typename _Tp = void>
struct enable_if
{ };
// Partial specialization for true.
template<typename _Tp>
struct enable_if<true, _Tp>
{ typedef _Tp type; };
template<typename... _Cond>
using _Require = typename enable_if<__and_<_Cond...>::value>::type;
// Primary template.
/// Define a member typedef @c type to one of two argument types.
template<bool _Cond, typename _Iftrue, typename _Iffalse>
struct conditional
{ typedef _Iftrue type; };
// Partial specialization for false.
template<typename _Iftrue, typename _Iffalse>
struct conditional<false, _Iftrue, _Iffalse>
{ typedef _Iffalse type; };
/// common_type
template<typename... _Tp>
struct common_type;
// Sfinae-friendly common_type implementation:
struct __do_common_type_impl
{
template<typename _Tp, typename _Up>
static __success_type<typename decay<decltype
(true ? std::declval<_Tp>()
: std::declval<_Up>())>::type> _S_test(int);
template<typename, typename>
static __failure_type _S_test(...);
};
template<typename _Tp, typename _Up>
struct __common_type_impl
: private __do_common_type_impl
{
#if !defined (__ANDROID__)
typedef decltype(_S_test<_Tp, _Up>(0)) type;
#else
# 1998 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
typedef typename decay<decltype(_S_test<_Tp, _Up>(0))>::type type;
#endif
# 2000 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
};
struct __do_member_type_wrapper
{
template<typename _Tp>
static __success_type<typename _Tp::type> _S_test(int);
template<typename>
static __failure_type _S_test(...);
};
template<typename _Tp>
struct __member_type_wrapper
: private __do_member_type_wrapper
{
typedef decltype(_S_test<_Tp>(0)) type;
};
template<typename _CTp, typename... _Args>
struct __expanded_common_type_wrapper
{
typedef common_type<typename _CTp::type, _Args...> type;
};
template<typename... _Args>
struct __expanded_common_type_wrapper<__failure_type, _Args...>
{ typedef __failure_type type; };
template<typename _Tp>
struct common_type<_Tp>
{ typedef typename decay<_Tp>::type type; };
template<typename _Tp, typename _Up>
struct common_type<_Tp, _Up>
: public __common_type_impl<_Tp, _Up>::type
{ };
template<typename _Tp, typename _Up, typename... _Vp>
struct common_type<_Tp, _Up, _Vp...>
: public __expanded_common_type_wrapper<typename __member_type_wrapper<
common_type<_Tp, _Up>>::type, _Vp...>::type
{ };
/// The underlying type of an enum.
template<typename _Tp>
struct underlying_type
{
typedef __underlying_type(_Tp) type;
};
template<typename _Tp>
struct __declval_protector
{
static const bool __stop = false;
static typename add_rvalue_reference<_Tp>::type __delegate();
};
template<typename _Tp>
inline decltype(__declval<_Tp>(0))
declval() noexcept
{
static_assert(__declval_protector<_Tp>::__stop,
"declval() must not be used!");
return __declval_protector<_Tp>::__delegate();
}
/// result_of
template<typename _Signature>
class result_of;
// Sfinae-friendly result_of implementation:
#define __cpp_lib_result_of_sfinae 201210
// [func.require] paragraph 1 bullet 1:
struct __result_of_memfun_ref_impl
{
template<typename _Fp, typename _Tp1, typename... _Args>
static __success_type<decltype(
(std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...)
)> _S_test(int);
template<typename...>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg, typename... _Args>
struct __result_of_memfun_ref
: private __result_of_memfun_ref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
};
// [func.require] paragraph 1 bullet 2:
struct __result_of_memfun_deref_impl
{
template<typename _Fp, typename _Tp1, typename... _Args>
static __success_type<decltype(
((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...)
)> _S_test(int);
template<typename...>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg, typename... _Args>
struct __result_of_memfun_deref
: private __result_of_memfun_deref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type;
};
// [func.require] paragraph 1 bullet 3:
struct __result_of_memobj_ref_impl
{
template<typename _Fp, typename _Tp1>
static __success_type<decltype(
std::declval<_Tp1>().*std::declval<_Fp>()
)> _S_test(int);
template<typename, typename>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg>
struct __result_of_memobj_ref
: private __result_of_memobj_ref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
};
// [func.require] paragraph 1 bullet 4:
struct __result_of_memobj_deref_impl
{
template<typename _Fp, typename _Tp1>
static __success_type<decltype(
(*std::declval<_Tp1>()).*std::declval<_Fp>()
)> _S_test(int);
template<typename, typename>
static __failure_type _S_test(...);
};
template<typename _MemPtr, typename _Arg>
struct __result_of_memobj_deref
: private __result_of_memobj_deref_impl
{
typedef decltype(_S_test<_MemPtr, _Arg>(0)) type;
};
template<typename _MemPtr, typename _Arg>
struct __result_of_memobj;
template<typename _Res, typename _Class, typename _Arg>
struct __result_of_memobj<_Res _Class::*, _Arg>
{
typedef typename remove_cv<typename remove_reference<
_Arg>::type>::type _Argval;
typedef _Res _Class::* _MemPtr;
typedef typename conditional<__or_<is_same<_Argval, _Class>,
is_base_of<_Class, _Argval>>::value,
__result_of_memobj_ref<_MemPtr, _Arg>,
__result_of_memobj_deref<_MemPtr, _Arg>
>::type::type type;
};
template<typename _MemPtr, typename _Arg, typename... _Args>
struct __result_of_memfun;
template<typename _Res, typename _Class, typename _Arg, typename... _Args>
struct __result_of_memfun<_Res _Class::*, _Arg, _Args...>
{
typedef typename remove_cv<typename remove_reference<
_Arg>::type>::type _Argval;
typedef _Res _Class::* _MemPtr;
typedef typename conditional<__or_<is_same<_Argval, _Class>,
is_base_of<_Class, _Argval>>::value,
__result_of_memfun_ref<_MemPtr, _Arg, _Args...>,
__result_of_memfun_deref<_MemPtr, _Arg, _Args...>
>::type::type type;
};
template<bool, bool, typename _Functor, typename... _ArgTypes>
struct __result_of_impl
{
typedef __failure_type type;
};
template<typename _MemPtr, typename _Arg>
struct __result_of_impl<true, false, _MemPtr, _Arg>
: public __result_of_memobj<typename decay<_MemPtr>::type, _Arg>
{ };
template<typename _MemPtr, typename _Arg, typename... _Args>
struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...>
: public __result_of_memfun<typename decay<_MemPtr>::type, _Arg, _Args...>
{ };
// [func.require] paragraph 1 bullet 5:
struct __result_of_other_impl
{
template<typename _Fn, typename... _Args>
static __success_type<decltype(
std::declval<_Fn>()(std::declval<_Args>()...)
)> _S_test(int);
template<typename...>
static __failure_type _S_test(...);
};
template<typename _Functor, typename... _ArgTypes>
struct __result_of_impl<false, false, _Functor, _ArgTypes...>
: private __result_of_other_impl
{
typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
};
template<typename _Functor, typename... _ArgTypes>
struct result_of<_Functor(_ArgTypes...)>
: public __result_of_impl<
is_member_object_pointer<
typename remove_reference<_Functor>::type
>::value,
is_member_function_pointer<
typename remove_reference<_Functor>::type
>::value,
_Functor, _ArgTypes...
>::type
{ };
#if __cplusplus > 201103L
/// Alias template for aligned_storage
template<size_t _Len, size_t _Align =
__alignof__(typename __aligned_storage_msa<_Len>::__type)>
using aligned_storage_t = typename aligned_storage<_Len, _Align>::type;
/// Alias template for decay
template<typename _Tp>
using decay_t = typename decay<_Tp>::type;
/// Alias template for enable_if
template<bool _Cond, typename _Tp = void>
using enable_if_t = typename enable_if<_Cond, _Tp>::type;
/// Alias template for conditional
template<bool _Cond, typename _Iftrue, typename _Iffalse>
using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type;
/// Alias template for common_type
template<typename... _Tp>
using common_type_t = typename common_type<_Tp...>::type;
/// Alias template for underlying_type
template<typename _Tp>
using underlying_type_t = typename underlying_type<_Tp>::type;
/// Alias template for result_of
template<typename _Tp>
using result_of_t = typename result_of<_Tp>::type;
#endif
# 2260 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
/// @} group metaprogramming
/**
* Use SFINAE to determine if the type _Tp has a publicly-accessible
* member type _NTYPE.
*/
#define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \
template<typename _Tp> \
class __has_##_NTYPE##_helper \
{ \
template<typename _Up> \
struct _Wrap_type \
{ }; \
\
template<typename _Up> \
static true_type __test(_Wrap_type<typename _Up::_NTYPE>*); \
\
template<typename _Up> \
static false_type __test(...); \
\
public: \
typedef decltype(__test<_Tp>(0)) type; \
}; \
\
template<typename _Tp> \
struct __has_##_NTYPE \
: public __has_##_NTYPE##_helper \
<typename remove_cv<_Tp>::type>::type \
{ };
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // C++11
# 2295 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
#endif // _GLIBCXX_TYPE_TRAITS
# 2297 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/type_traits" 3
# 58 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup utilities
* @{
*/
/**
* @brief Forward an lvalue.
* @return The parameter cast to the specified type.
*
* This function is used to implement "perfect forwarding".
*/
template<typename _Tp>
constexpr _Tp&&
forward(typename std::remove_reference<_Tp>::type& __t) noexcept
{ return static_cast<_Tp&&>(__t); }
/**
* @brief Forward an rvalue.
* @return The parameter cast to the specified type.
*
* This function is used to implement "perfect forwarding".
*/
template<typename _Tp>
constexpr _Tp&&
forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
{
static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument"
" substituting _Tp is an lvalue reference type");
return static_cast<_Tp&&>(__t);
}
/**
* @brief Convert a value to an rvalue.
* @param __t A thing of arbitrary type.
* @return The parameter cast to an rvalue-reference to allow moving it.
*/
template<typename _Tp>
constexpr typename std::remove_reference<_Tp>::type&&
move(_Tp&& __t) noexcept
{ return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
template<typename _Tp>
struct __move_if_noexcept_cond
: public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
is_copy_constructible<_Tp>>::type { };
/**
* @brief Conditionally convert a value to an rvalue.
* @param __x A thing of arbitrary type.
* @return The parameter, possibly cast to an rvalue-reference.
*
* Same as std::move unless the type's move constructor could throw and the
* type is copyable, in which case an lvalue-reference is returned instead.
*/
template<typename _Tp>
constexpr typename
conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type
move_if_noexcept(_Tp& __x) noexcept
{ return std::move(__x); }
// declval, from type_traits.
/**
* @brief Returns the actual address of the object or function
* referenced by r, even in the presence of an overloaded
* operator&.
* @param __r Reference to an object or function.
* @return The actual address.
*/
template<typename _Tp>
inline _Tp*
addressof(_Tp& __r) noexcept
{ return std::__addressof(__r); }
/// @} group utilities
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#define _GLIBCXX_MOVE(__val) std::move(__val)
#define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)
#else
# 145 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
#define _GLIBCXX_MOVE(__val) (__val)
#define _GLIBCXX_FORWARD(_Tp, __val) (__val)
#endif
# 148 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup utilities
* @{
*/
/**
* @brief Swaps two values.
* @param __a A thing of arbitrary type.
* @param __b Another thing of arbitrary type.
* @return Nothing.
*/
template<typename _Tp>
inline void
swap(_Tp& __a, _Tp& __b)
#if __cplusplus >= 201103L
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
is_nothrow_move_assignable<_Tp>>::value)
#endif
# 171 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
{
// concept requirements
__glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
_Tp __tmp = _GLIBCXX_MOVE(__a);
__a = _GLIBCXX_MOVE(__b);
__b = _GLIBCXX_MOVE(__tmp);
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 809. std::swap should be overloaded for array types.
/// Swap the contents of two arrays.
template<typename _Tp, size_t _Nm>
inline void
swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
#if __cplusplus >= 201103L
noexcept(noexcept(swap(*__a, *__b)))
#endif
# 189 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
{
for (size_t __n = 0; __n < _Nm; ++__n)
swap(__a[__n], __b[__n]);
}
/// @} group utilities
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _MOVE_H */
# 199 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/move.h" 3
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 2 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <type_traits> // for std::__decay_and_strip too
#endif /* expanded by -frewrite-includes */
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup utilities
* @{
*/
#if __cplusplus >= 201103L
/// piecewise_construct_t
struct piecewise_construct_t { };
/// piecewise_construct
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
// Forward declarations.
template<typename...>
class tuple;
template<std::size_t...>
struct _Index_tuple;
#endif
# 88 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
/**
* @brief Struct holding two objects of arbitrary type.
*
* @tparam _T1 Type of first object.
* @tparam _T2 Type of second object.
*/
template<class _T1, class _T2>
struct pair
{
typedef _T1 first_type; /// @c first_type is the first bound type
typedef _T2 second_type; /// @c second_type is the second bound type
_T1 first; /// @c first is a copy of the first object
_T2 second; /// @c second is a copy of the second object
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 265. std::pair::pair() effects overly restrictive
/** The default constructor creates @c first and @c second using their
* respective default constructors. */
_GLIBCXX_CONSTEXPR pair()
: first(), second() { }
/** Two objects may be passed to a @c pair constructor to be copied. */
_GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b)
: first(__a), second(__b) { }
/** There is also a templated copy ctor for the @c pair class itself. */
#if __cplusplus < 201103L
template<class _U1, class _U2>
pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
#else
# 121 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
template<class _U1, class _U2, class = typename
enable_if<__and_<is_convertible<const _U1&, _T1>,
is_convertible<const _U2&, _T2>>::value>::type>
constexpr pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) { }
constexpr pair(const pair&) = default;
constexpr pair(pair&&) = default;
// DR 811.
template<class _U1, class = typename
enable_if<is_convertible<_U1, _T1>::value>::type>
constexpr pair(_U1&& __x, const _T2& __y)
: first(std::forward<_U1>(__x)), second(__y) { }
template<class _U2, class = typename
enable_if<is_convertible<_U2, _T2>::value>::type>
constexpr pair(const _T1& __x, _U2&& __y)
: first(__x), second(std::forward<_U2>(__y)) { }
template<class _U1, class _U2, class = typename
enable_if<__and_<is_convertible<_U1, _T1>,
is_convertible<_U2, _T2>>::value>::type>
constexpr pair(_U1&& __x, _U2&& __y)
: first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
template<class _U1, class _U2, class = typename
enable_if<__and_<is_convertible<_U1, _T1>,
is_convertible<_U2, _T2>>::value>::type>
constexpr pair(pair<_U1, _U2>&& __p)
: first(std::forward<_U1>(__p.first)),
second(std::forward<_U2>(__p.second)) { }
template<typename... _Args1, typename... _Args2>
pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
pair&
operator=(const pair& __p)
{
first = __p.first;
second = __p.second;
return *this;
}
pair&
operator=(pair&& __p)
noexcept(__and_<is_nothrow_move_assignable<_T1>,
is_nothrow_move_assignable<_T2>>::value)
{
first = std::forward<first_type>(__p.first);
second = std::forward<second_type>(__p.second);
return *this;
}
template<class _U1, class _U2>
pair&
operator=(const pair<_U1, _U2>& __p)
{
first = __p.first;
second = __p.second;
return *this;
}
template<class _U1, class _U2>
pair&
operator=(pair<_U1, _U2>&& __p)
{
first = std::forward<_U1>(__p.first);
second = std::forward<_U2>(__p.second);
return *this;
}
void
swap(pair& __p)
noexcept(noexcept(swap(first, __p.first))
&& noexcept(swap(second, __p.second)))
{
using std::swap;
swap(first, __p.first);
swap(second, __p.second);
}
private:
template<typename... _Args1, std::size_t... _Indexes1,
typename... _Args2, std::size_t... _Indexes2>
pair(tuple<_Args1...>&, tuple<_Args2...>&,
_Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
#endif
# 209 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
};
/// Two pairs of the same type are equal iff their members are equal.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first == __y.first && __x.second == __y.second; }
/// <http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html>
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __x.first < __y.first
|| (!(__y.first < __x.first) && __x.second < __y.second); }
/// Uses @c operator== to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x == __y); }
/// Uses @c operator< to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return __y < __x; }
/// Uses @c operator< to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__y < __x); }
/// Uses @c operator< to find the result.
template<class _T1, class _T2>
inline _GLIBCXX_CONSTEXPR bool
operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{ return !(__x < __y); }
#if __cplusplus >= 201103L
/// See std::pair::swap().
// Note: no std::swap overloads in C++03 mode, this has performance
// implications, see, eg, libstdc++/38466.
template<class _T1, class _T2>
inline void
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
noexcept(noexcept(__x.swap(__y)))
{ __x.swap(__y); }
#endif
# 258 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
/**
* @brief A convenience wrapper for creating a pair from two objects.
* @param __x The first object.
* @param __y The second object.
* @return A newly-constructed pair<> object of the appropriate type.
*
* The standard requires that the objects be passed by reference-to-const,
* but LWG issue #181 says they should be passed by const value. We follow
* the LWG by default.
*/
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 181. make_pair() unintended behavior
#if __cplusplus >= 201103L
// NB: DR 706.
template<class _T1, class _T2>
constexpr pair<typename __decay_and_strip<_T1>::__type,
typename __decay_and_strip<_T2>::__type>
make_pair(_T1&& __x, _T2&& __y)
{
typedef typename __decay_and_strip<_T1>::__type __ds_type1;
typedef typename __decay_and_strip<_T2>::__type __ds_type2;
typedef pair<__ds_type1, __ds_type2> __pair_type;
return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
}
#else
# 284 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
template<class _T1, class _T2>
inline pair<_T1, _T2>
make_pair(_T1 __x, _T2 __y)
{ return pair<_T1, _T2>(__x, __y); }
#endif
# 289 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
/// @}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif /* _STL_PAIR_H */
# 296 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_pair.h" 3
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_iterator_base_types.h>
#endif /* expanded by -frewrite-includes */
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 1 3
// Types used in iterator implementation -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_iterator_base_types.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iterator}
*
* This file contains all of the general iterator-related utility types,
* such as iterator_traits and struct iterator.
*/
#ifndef _STL_ITERATOR_BASE_TYPES_H
#define _STL_ITERATOR_BASE_TYPES_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
# include <type_traits> // For _GLIBCXX_HAS_NESTED_TYPE, is_convertible
#endif /* expanded by -frewrite-includes */
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
#endif
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup iterators Iterators
* Abstractions for uniform iterating through various underlying types.
*/
//@{
/**
* @defgroup iterator_tags Iterator Tags
* These are empty types, used to distinguish different iterators. The
* distinction is not made by what they contain, but simply by what they
* are. Different underlying algorithms can then be used based on the
* different operations supported by different iterator types.
*/
//@{
/// Marking input iterators.
struct input_iterator_tag { };
/// Marking output iterators.
struct output_iterator_tag { };
/// Forward iterators support a superset of input iterator operations.
struct forward_iterator_tag : public input_iterator_tag { };
/// Bidirectional iterators support a superset of forward iterator
/// operations.
struct bidirectional_iterator_tag : public forward_iterator_tag { };
/// Random-access iterators support a superset of bidirectional
/// iterator operations.
struct random_access_iterator_tag : public bidirectional_iterator_tag { };
//@}
/**
* @brief Common %iterator class.
*
* This class does nothing but define nested typedefs. %Iterator classes
* can inherit from this class to save some work. The typedefs are then
* used in specializations and overloading.
*
* In particular, there are no default implementations of requirements
* such as @c operator++ and the like. (How could there be?)
*/
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
typename _Pointer = _Tp*, typename _Reference = _Tp&>
struct iterator
{
/// One of the @link iterator_tags tag types@endlink.
typedef _Category iterator_category;
/// The type "pointed to" by the iterator.
typedef _Tp value_type;
/// Distance between iterators is represented as this type.
typedef _Distance difference_type;
/// This type represents a pointer-to-value_type.
typedef _Pointer pointer;
/// This type represents a reference-to-value_type.
typedef _Reference reference;
};
/**
* @brief Traits class for iterators.
*
* This class does nothing but define nested typedefs. The general
* version simply @a forwards the nested typedefs from the Iterator
* argument. Specialized versions for pointers and pointers-to-const
* provide tighter, more correct semantics.
*/
#if __cplusplus >= 201103L
_GLIBCXX_HAS_NESTED_TYPE(iterator_category)
template<typename _Iterator,
bool = __has_iterator_category<_Iterator>::value>
struct __iterator_traits { };
template<typename _Iterator>
struct __iterator_traits<_Iterator, true>
{
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
template<typename _Iterator>
struct iterator_traits
: public __iterator_traits<_Iterator> { };
#else
# 162 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
template<typename _Iterator>
struct iterator_traits
{
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
#endif
# 172 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
/// Partial specialization for pointer types.
template<typename _Tp>
struct iterator_traits<_Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
/// Partial specialization for const pointer types.
template<typename _Tp>
struct iterator_traits<const _Tp*>
{
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
/**
* This function is not a part of the C++ standard but is syntactic
* sugar for internal library use only.
*/
template<typename _Iter>
inline typename iterator_traits<_Iter>::iterator_category
__iterator_category(const _Iter&)
{ return typename iterator_traits<_Iter>::iterator_category(); }
//@}
// If _Iterator has a base returns it otherwise _Iterator is returned
// untouched
template<typename _Iterator, bool _HasBase>
struct _Iter_base
{
typedef _Iterator iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it; }
};
template<typename _Iterator>
struct _Iter_base<_Iterator, true>
{
typedef typename _Iterator::iterator_type iterator_type;
static iterator_type _S_base(_Iterator __it)
{ return __it.base(); }
};
#if __cplusplus >= 201103L
template<typename _InIter>
using _RequireInputIter = typename
enable_if<is_convertible<typename
iterator_traits<_InIter>::iterator_category,
input_iterator_tag>::value>::type;
#endif
# 231 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _STL_ITERATOR_BASE_TYPES_H */
# 236 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_types.h" 3
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_iterator_base_funcs.h>
#endif /* expanded by -frewrite-includes */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 1 3
// Functions used by iterators -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_iterator_base_funcs.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iterator}
*
* This file contains all of the general iterator-related utility
* functions, such as distance() and advance().
*/
#ifndef _STL_ITERATOR_BASE_FUNCS_H
#define _STL_ITERATOR_BASE_FUNCS_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/concept_check.h>
#endif /* expanded by -frewrite-includes */
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 3
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <debug/debug.h>
#endif /* expanded by -frewrite-includes */
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 1 3
// Debugging support implementation -*- C++ -*-
// Copyright (C) 2003-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file debug/debug.h
* This file is a GNU debug extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_DEBUG_MACRO_SWITCH_H
#define _GLIBCXX_DEBUG_MACRO_SWITCH_H 1
/** Macros and namespaces used by the implementation outside of debug
* wrappers to verify certain properties. The __glibcxx_requires_xxx
* macros are merely wrappers around the __glibcxx_check_xxx wrappers
* when we are compiling with debug mode, but disappear when we are
* in release mode so that there is no checking performed in, e.g.,
* the standard library algorithms.
*/
// Debug mode namespaces.
/**
* @namespace std::__debug
* @brief GNU debug code, replaces standard behavior with debug behavior.
*/
namespace std
{
namespace __debug { }
}
/** @namespace __gnu_debug
* @brief GNU debug classes for public use.
*/
namespace __gnu_debug
{
using namespace std::__debug;
}
#ifndef _GLIBCXX_DEBUG
# define _GLIBCXX_DEBUG_ASSERT(_Condition)
# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
# define _GLIBCXX_DEBUG_ONLY(_Statement) ;
# define __glibcxx_requires_cond(_Cond,_Msg)
# define __glibcxx_requires_valid_range(_First,_Last)
# define __glibcxx_requires_non_empty_range(_First,_Last)
# define __glibcxx_requires_sorted(_First,_Last)
# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred)
# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2)
# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred)
# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value)
# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value)
# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred)
# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred)
# define __glibcxx_requires_heap(_First,_Last)
# define __glibcxx_requires_heap_pred(_First,_Last,_Pred)
# define __glibcxx_requires_nonempty()
# define __glibcxx_requires_string(_String)
# define __glibcxx_requires_string_len(_String,_Len)
# define __glibcxx_requires_subscript(_N)
#else
# 83 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
#if 0 /* expanded by -frewrite-includes */
# include <debug/macros.h>
#endif /* expanded by -frewrite-includes */
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
# 85 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
#define _GLIBCXX_DEBUG_ASSERT(_Condition) __glibcxx_assert(_Condition)
#ifdef _GLIBCXX_DEBUG_PEDANTIC
# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) _GLIBCXX_DEBUG_ASSERT(_Condition)
#else
# 91 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
#endif
# 93 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
# define _GLIBCXX_DEBUG_ONLY(_Statement) _Statement
# define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg)
# define __glibcxx_requires_valid_range(_First,_Last) \
__glibcxx_check_valid_range(_First,_Last)
# define __glibcxx_requires_non_empty_range(_First,_Last) \
__glibcxx_check_non_empty_range(_First,_Last)
# define __glibcxx_requires_sorted(_First,_Last) \
__glibcxx_check_sorted(_First,_Last)
# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \
__glibcxx_check_sorted_pred(_First,_Last,_Pred)
# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \
__glibcxx_check_sorted_set(_First1,_Last1,_First2)
# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) \
__glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred)
# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) \
__glibcxx_check_partitioned_lower(_First,_Last,_Value)
# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) \
__glibcxx_check_partitioned_upper(_First,_Last,_Value)
# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
__glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred)
# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
__glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred)
# define __glibcxx_requires_heap(_First,_Last) \
__glibcxx_check_heap(_First,_Last)
# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \
__glibcxx_check_heap_pred(_First,_Last,_Pred)
# define __glibcxx_requires_nonempty() __glibcxx_check_nonempty()
# define __glibcxx_requires_string(_String) __glibcxx_check_string(_String)
# define __glibcxx_requires_string_len(_String,_Len) \
__glibcxx_check_string_len(_String,_Len)
# define __glibcxx_requires_subscript(_N) __glibcxx_check_subscript(_N)
#if 0 /* expanded by -frewrite-includes */
# include <debug/functions.h>
#endif /* expanded by -frewrite-includes */
# 127 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
# 128 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
#endif
# 130 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
#endif // _GLIBCXX_DEBUG_MACRO_SWITCH_H
# 132 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/debug/debug.h" 3
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last,
input_iterator_tag)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last)
{
++__first;
++__n;
}
return __n;
}
template<typename _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
// concept requirements
__glibcxx_function_requires(_RandomAccessIteratorConcept<
_RandomAccessIterator>)
return __last - __first;
}
/**
* @brief A generalization of pointer arithmetic.
* @param __first An input iterator.
* @param __last An input iterator.
* @return The distance between them.
*
* Returns @c n such that __first + n == __last. This requires
* that @p __last must be reachable from @p __first. Note that @c
* n may be negative.
*
* For random access iterators, this uses their @c + and @c - operations
* and are constant time. For other %iterator classes they are linear time.
*/
template<typename _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last)
{
// concept requirements -- taken care of in __distance
return std::__distance(__first, __last,
std::__iterator_category(__first));
}
template<typename _InputIterator, typename _Distance>
inline void
__advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
_GLIBCXX_DEBUG_ASSERT(__n >= 0);
while (__n--)
++__i;
}
template<typename _BidirectionalIterator, typename _Distance>
inline void
__advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
// concept requirements
__glibcxx_function_requires(_BidirectionalIteratorConcept<
_BidirectionalIterator>)
if (__n > 0)
while (__n--)
++__i;
else
while (__n++)
--__i;
}
template<typename _RandomAccessIterator, typename _Distance>
inline void
__advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
// concept requirements
__glibcxx_function_requires(_RandomAccessIteratorConcept<
_RandomAccessIterator>)
__i += __n;
}
/**
* @brief A generalization of pointer arithmetic.
* @param __i An input iterator.
* @param __n The @a delta by which to change @p __i.
* @return Nothing.
*
* This increments @p i by @p n. For bidirectional and random access
* iterators, @p __n may be negative, in which case @p __i is decremented.
*
* For random access iterators, this uses their @c + and @c - operations
* and are constant time. For other %iterator classes they are linear time.
*/
template<typename _InputIterator, typename _Distance>
inline void
advance(_InputIterator& __i, _Distance __n)
{
// concept requirements -- taken care of in __advance
typename iterator_traits<_InputIterator>::difference_type __d = __n;
std::__advance(__i, __d, std::__iterator_category(__i));
}
#if __cplusplus >= 201103L
template<typename _ForwardIterator>
inline _ForwardIterator
next(_ForwardIterator __x, typename
iterator_traits<_ForwardIterator>::difference_type __n = 1)
{
std::advance(__x, __n);
return __x;
}
template<typename _BidirectionalIterator>
inline _BidirectionalIterator
prev(_BidirectionalIterator __x, typename
iterator_traits<_BidirectionalIterator>::difference_type __n = 1)
{
std::advance(__x, -__n);
return __x;
}
#endif // C++11
# 201 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _STL_ITERATOR_BASE_FUNCS_H */
# 206 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator_base_funcs.h" 3
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_iterator.h>
#endif /* expanded by -frewrite-includes */
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 1 3
// Iterators -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_iterator.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iterator}
*
* This file implements reverse_iterator, back_insert_iterator,
* front_insert_iterator, insert_iterator, __normal_iterator, and their
* supporting functions and overloaded operators.
*/
#ifndef _STL_ITERATOR_H
#define _STL_ITERATOR_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/cpp_type_traits.h>
#endif /* expanded by -frewrite-includes */
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/type_traits.h>
#endif /* expanded by -frewrite-includes */
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h>
#endif /* expanded by -frewrite-includes */
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/ptr_traits.h>
#endif /* expanded by -frewrite-includes */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/ptr_traits.h" 1 3
// Pointer Traits -*- C++ -*-
// Copyright (C) 2011-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/ptr_traits.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _PTR_TRAITS_H
#define _PTR_TRAITS_H 1
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <type_traits> // For _GLIBCXX_HAS_NESTED_TYPE
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/ptr_traits.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/ptr_traits.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_HAS_NESTED_TYPE(element_type)
_GLIBCXX_HAS_NESTED_TYPE(difference_type)
template<typename _Tp, bool = __has_element_type<_Tp>::value>
struct __ptrtr_elt_type;
template<typename _Tp>
struct __ptrtr_elt_type<_Tp, true>
{
typedef typename _Tp::element_type __type;
};
template<template<typename, typename...> class _SomePtr, typename _Tp,
typename... _Args>
struct __ptrtr_elt_type<_SomePtr<_Tp, _Args...>, false>
{
typedef _Tp __type;
};
template<typename _Tp, bool = __has_difference_type<_Tp>::value>
struct __ptrtr_diff_type
{
typedef typename _Tp::difference_type __type;
};
template<typename _Tp>
struct __ptrtr_diff_type<_Tp, false>
{
typedef ptrdiff_t __type;
};
template<typename _Ptr, typename _Up>
class __ptrtr_rebind_helper
{
template<typename _Ptr2, typename _Up2>
static constexpr true_type
_S_chk(typename _Ptr2::template rebind<_Up2>*);
template<typename, typename>
static constexpr false_type
_S_chk(...);
public:
using __type = decltype(_S_chk<_Ptr, _Up>(nullptr));
};
template<typename _Tp, typename _Up,
bool = __ptrtr_rebind_helper<_Tp, _Up>::__type::value>
struct __ptrtr_rebind;
template<typename _Tp, typename _Up>
struct __ptrtr_rebind<_Tp, _Up, true>
{
typedef typename _Tp::template rebind<_Up> __type;
};
template<template<typename, typename...> class _SomePtr, typename _Up,
typename _Tp, typename... _Args>
struct __ptrtr_rebind<_SomePtr<_Tp, _Args...>, _Up, false>
{
typedef _SomePtr<_Up, _Args...> __type;
};
template<typename _Tp, typename = typename remove_cv<_Tp>::type>
struct __ptrtr_not_void
{
typedef _Tp __type;
};
template<typename _Tp>
struct __ptrtr_not_void<_Tp, void>
{
struct __type { };
};
template<typename _Ptr>
class __ptrtr_pointer_to
{
typedef typename __ptrtr_elt_type<_Ptr>::__type __orig_type;
typedef typename __ptrtr_not_void<__orig_type>::__type __element_type;
public:
static _Ptr pointer_to(__element_type& __e)
{ return _Ptr::pointer_to(__e); }
};
/**
* @brief Uniform interface to all pointer-like types
* @ingroup pointer_abstractions
*/
template<typename _Ptr>
struct pointer_traits : __ptrtr_pointer_to<_Ptr>
{
/// The pointer type
typedef _Ptr pointer;
/// The type pointed to
typedef typename __ptrtr_elt_type<_Ptr>::__type element_type;
/// Type used to represent the difference between two pointers
typedef typename __ptrtr_diff_type<_Ptr>::__type difference_type;
template<typename _Up>
using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type;
};
/**
* @brief Partial specialization for built-in pointers.
* @ingroup pointer_abstractions
*/
template<typename _Tp>
struct pointer_traits<_Tp*>
{
/// The pointer type
typedef _Tp* pointer;
/// The type pointed to
typedef _Tp element_type;
/// Type used to represent the difference between two pointers
typedef ptrdiff_t difference_type;
template<typename _Up>
using rebind = _Up*;
/**
* @brief Obtain a pointer to an object
* @param __r A reference to an object of type @c element_type
* @return @c addressof(__r)
*/
static pointer
pointer_to(typename __ptrtr_not_void<element_type>::__type& __r) noexcept
{ return std::addressof(__r); }
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
# 176 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/ptr_traits.h" 3
#endif
# 178 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/ptr_traits.h" 3
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup iterators
* @{
*/
// 24.4.1 Reverse iterators
/**
* Bidirectional and random access iterators have corresponding reverse
* %iterator adaptors that iterate through the data structure in the
* opposite direction. They have the same signatures as the corresponding
* iterators. The fundamental relation between a reverse %iterator and its
* corresponding %iterator @c i is established by the identity:
* @code
* &*(reverse_iterator(i)) == &*(i - 1)
* @endcode
*
* <em>This mapping is dictated by the fact that while there is always a
* pointer past the end of an array, there might not be a valid pointer
* before the beginning of an array.</em> [24.4.1]/1,2
*
* Reverse iterators can be tricky and surprising at first. Their
* semantics make sense, however, and the trickiness is a side effect of
* the requirement that the iterators must be safe.
*/
template<typename _Iterator>
class reverse_iterator
: public iterator<typename iterator_traits<_Iterator>::iterator_category,
typename iterator_traits<_Iterator>::value_type,
typename iterator_traits<_Iterator>::difference_type,
typename iterator_traits<_Iterator>::pointer,
typename iterator_traits<_Iterator>::reference>
{
protected:
_Iterator current;
typedef iterator_traits<_Iterator> __traits_type;
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::pointer pointer;
typedef typename __traits_type::reference reference;
/**
* The default constructor value-initializes member @p current.
* If it is a pointer, that means it is zero-initialized.
*/
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 235 No specification of default ctor for reverse_iterator
reverse_iterator() : current() { }
/**
* This %iterator will move in the opposite direction that @p x does.
*/
explicit
reverse_iterator(iterator_type __x) : current(__x) { }
/**
* The copy constructor is normal.
*/
reverse_iterator(const reverse_iterator& __x)
: current(__x.current) { }
/**
* A %reverse_iterator across other types can be copied if the
* underlying %iterator can be converted to the type of @c current.
*/
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
: current(__x.base()) { }
/**
* @return @c current, the %iterator used for underlying work.
*/
iterator_type
base() const
{ return current; }
/**
* @return A reference to the value at @c --current
*
* This requires that @c --current is dereferenceable.
*
* @warning This implementation requires that for an iterator of the
* underlying iterator type, @c x, a reference obtained by
* @c *x remains valid after @c x has been modified or
* destroyed. This is a bug: http://gcc.gnu.org/PR51823
*/
reference
operator*() const
{
_Iterator __tmp = current;
return *--__tmp;
}
/**
* @return A pointer to the value at @c --current
*
* This requires that @c --current is dereferenceable.
*/
pointer
operator->() const
{ return &(operator*()); }
/**
* @return @c *this
*
* Decrements the underlying iterator.
*/
reverse_iterator&
operator++()
{
--current;
return *this;
}
/**
* @return The original value of @c *this
*
* Decrements the underlying iterator.
*/
reverse_iterator
operator++(int)
{
reverse_iterator __tmp = *this;
--current;
return __tmp;
}
/**
* @return @c *this
*
* Increments the underlying iterator.
*/
reverse_iterator&
operator--()
{
++current;
return *this;
}
/**
* @return A reverse_iterator with the previous value of @c *this
*
* Increments the underlying iterator.
*/
reverse_iterator
operator--(int)
{
reverse_iterator __tmp = *this;
++current;
return __tmp;
}
/**
* @return A reverse_iterator that refers to @c current - @a __n
*
* The underlying iterator must be a Random Access Iterator.
*/
reverse_iterator
operator+(difference_type __n) const
{ return reverse_iterator(current - __n); }
/**
* @return *this
*
* Moves the underlying iterator backwards @a __n steps.
* The underlying iterator must be a Random Access Iterator.
*/
reverse_iterator&
operator+=(difference_type __n)
{
current -= __n;
return *this;
}
/**
* @return A reverse_iterator that refers to @c current - @a __n
*
* The underlying iterator must be a Random Access Iterator.
*/
reverse_iterator
operator-(difference_type __n) const
{ return reverse_iterator(current + __n); }
/**
* @return *this
*
* Moves the underlying iterator forwards @a __n steps.
* The underlying iterator must be a Random Access Iterator.
*/
reverse_iterator&
operator-=(difference_type __n)
{
current += __n;
return *this;
}
/**
* @return The value at @c current - @a __n - 1
*
* The underlying iterator must be a Random Access Iterator.
*/
reference
operator[](difference_type __n) const
{ return *(*this + __n); }
};
//@{
/**
* @param __x A %reverse_iterator.
* @param __y A %reverse_iterator.
* @return A simple bool.
*
* Reverse iterators forward many operations to their underlying base()
* iterators. Others are implemented in terms of one another.
*
*/
template<typename _Iterator>
inline bool
operator==(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
template<typename _Iterator>
inline bool
operator<(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() < __x.base(); }
template<typename _Iterator>
inline bool
operator!=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x == __y); }
template<typename _Iterator>
inline bool
operator>(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y < __x; }
template<typename _Iterator>
inline bool
operator<=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__y < __x); }
template<typename _Iterator>
inline bool
operator>=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return !(__x < __y); }
template<typename _Iterator>
inline typename reverse_iterator<_Iterator>::difference_type
operator-(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y)
{ return __y.base() - __x.base(); }
template<typename _Iterator>
inline reverse_iterator<_Iterator>
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
const reverse_iterator<_Iterator>& __x)
{ return reverse_iterator<_Iterator>(__x.base() - __n); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 280. Comparison of reverse_iterator to const reverse_iterator.
template<typename _IteratorL, typename _IteratorR>
inline bool
operator==(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __x.base() == __y.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __y.base() < __x.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator!=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__x == __y); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return __y < __x; }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__y < __x); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>=(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
{ return !(__x < __y); }
template<typename _IteratorL, typename _IteratorR>
#if __cplusplus >= 201103L
// DR 685.
inline auto
operator-(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
-> decltype(__y.base() - __x.base())
#else
# 384 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
inline typename reverse_iterator<_IteratorL>::difference_type
operator-(const reverse_iterator<_IteratorL>& __x,
const reverse_iterator<_IteratorR>& __y)
#endif
# 388 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
{ return __y.base() - __x.base(); }
//@}
// 24.4.2.2.1 back_insert_iterator
/**
* @brief Turns assignment into insertion.
*
* These are output iterators, constructed from a container-of-T.
* Assigning a T to the iterator appends it to the container using
* push_back.
*
* Tip: Using the back_inserter function to create these iterators can
* save typing.
*/
template<typename _Container>
class back_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
public:
/// A nested typedef for the type of whatever container you used.
typedef _Container container_type;
/// The only way to create this %iterator is with a container.
explicit
back_insert_iterator(_Container& __x) : container(&__x) { }
/**
* @param __value An instance of whatever type
* container_type::const_reference is; presumably a
* reference-to-const T for container<T>.
* @return This %iterator, for chained operations.
*
* This kind of %iterator doesn't really have a @a position in the
* container (you can think of the position as being permanently at
* the end, if you like). Assigning a value to the %iterator will
* always append the value to the end of the container.
*/
#if __cplusplus < 201103L
back_insert_iterator&
operator=(typename _Container::const_reference __value)
{
container->push_back(__value);
return *this;
}
#else
# 436 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
back_insert_iterator&
operator=(const typename _Container::value_type& __value)
{
container->push_back(__value);
return *this;
}
back_insert_iterator&
operator=(typename _Container::value_type&& __value)
{
container->push_back(std::move(__value));
return *this;
}
#endif
# 450 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
/// Simply returns *this.
back_insert_iterator&
operator*()
{ return *this; }
/// Simply returns *this. (This %iterator does not @a move.)
back_insert_iterator&
operator++()
{ return *this; }
/// Simply returns *this. (This %iterator does not @a move.)
back_insert_iterator
operator++(int)
{ return *this; }
};
/**
* @param __x A container of arbitrary type.
* @return An instance of back_insert_iterator working on @p __x.
*
* This wrapper function helps in creating back_insert_iterator instances.
* Typing the name of the %iterator requires knowing the precise full
* type of the container, which can be tedious and impedes generic
* programming. Using this function lets you take advantage of automatic
* template parameter deduction, making the compiler match the correct
* types for you.
*/
template<typename _Container>
inline back_insert_iterator<_Container>
back_inserter(_Container& __x)
{ return back_insert_iterator<_Container>(__x); }
/**
* @brief Turns assignment into insertion.
*
* These are output iterators, constructed from a container-of-T.
* Assigning a T to the iterator prepends it to the container using
* push_front.
*
* Tip: Using the front_inserter function to create these iterators can
* save typing.
*/
template<typename _Container>
class front_insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
public:
/// A nested typedef for the type of whatever container you used.
typedef _Container container_type;
/// The only way to create this %iterator is with a container.
explicit front_insert_iterator(_Container& __x) : container(&__x) { }
/**
* @param __value An instance of whatever type
* container_type::const_reference is; presumably a
* reference-to-const T for container<T>.
* @return This %iterator, for chained operations.
*
* This kind of %iterator doesn't really have a @a position in the
* container (you can think of the position as being permanently at
* the front, if you like). Assigning a value to the %iterator will
* always prepend the value to the front of the container.
*/
#if __cplusplus < 201103L
front_insert_iterator&
operator=(typename _Container::const_reference __value)
{
container->push_front(__value);
return *this;
}
#else
# 526 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
front_insert_iterator&
operator=(const typename _Container::value_type& __value)
{
container->push_front(__value);
return *this;
}
front_insert_iterator&
operator=(typename _Container::value_type&& __value)
{
container->push_front(std::move(__value));
return *this;
}
#endif
# 540 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
/// Simply returns *this.
front_insert_iterator&
operator*()
{ return *this; }
/// Simply returns *this. (This %iterator does not @a move.)
front_insert_iterator&
operator++()
{ return *this; }
/// Simply returns *this. (This %iterator does not @a move.)
front_insert_iterator
operator++(int)
{ return *this; }
};
/**
* @param __x A container of arbitrary type.
* @return An instance of front_insert_iterator working on @p x.
*
* This wrapper function helps in creating front_insert_iterator instances.
* Typing the name of the %iterator requires knowing the precise full
* type of the container, which can be tedious and impedes generic
* programming. Using this function lets you take advantage of automatic
* template parameter deduction, making the compiler match the correct
* types for you.
*/
template<typename _Container>
inline front_insert_iterator<_Container>
front_inserter(_Container& __x)
{ return front_insert_iterator<_Container>(__x); }
/**
* @brief Turns assignment into insertion.
*
* These are output iterators, constructed from a container-of-T.
* Assigning a T to the iterator inserts it in the container at the
* %iterator's position, rather than overwriting the value at that
* position.
*
* (Sequences will actually insert a @e copy of the value before the
* %iterator's position.)
*
* Tip: Using the inserter function to create these iterators can
* save typing.
*/
template<typename _Container>
class insert_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_Container* container;
typename _Container::iterator iter;
public:
/// A nested typedef for the type of whatever container you used.
typedef _Container container_type;
/**
* The only way to create this %iterator is with a container and an
* initial position (a normal %iterator into the container).
*/
insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(&__x), iter(__i) {}
/**
* @param __value An instance of whatever type
* container_type::const_reference is; presumably a
* reference-to-const T for container<T>.
* @return This %iterator, for chained operations.
*
* This kind of %iterator maintains its own position in the
* container. Assigning a value to the %iterator will insert the
* value into the container at the place before the %iterator.
*
* The position is maintained such that subsequent assignments will
* insert values immediately after one another. For example,
* @code
* // vector v contains A and Z
*
* insert_iterator i (v, ++v.begin());
* i = 1;
* i = 2;
* i = 3;
*
* // vector v contains A, 1, 2, 3, and Z
* @endcode
*/
#if __cplusplus < 201103L
insert_iterator&
operator=(typename _Container::const_reference __value)
{
iter = container->insert(iter, __value);
++iter;
return *this;
}
#else
# 638 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
insert_iterator&
operator=(const typename _Container::value_type& __value)
{
iter = container->insert(iter, __value);
++iter;
return *this;
}
insert_iterator&
operator=(typename _Container::value_type&& __value)
{
iter = container->insert(iter, std::move(__value));
++iter;
return *this;
}
#endif
# 654 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
/// Simply returns *this.
insert_iterator&
operator*()
{ return *this; }
/// Simply returns *this. (This %iterator does not @a move.)
insert_iterator&
operator++()
{ return *this; }
/// Simply returns *this. (This %iterator does not @a move.)
insert_iterator&
operator++(int)
{ return *this; }
};
/**
* @param __x A container of arbitrary type.
* @return An instance of insert_iterator working on @p __x.
*
* This wrapper function helps in creating insert_iterator instances.
* Typing the name of the %iterator requires knowing the precise full
* type of the container, which can be tedious and impedes generic
* programming. Using this function lets you take advantage of automatic
* template parameter deduction, making the compiler match the correct
* types for you.
*/
template<typename _Container, typename _Iterator>
inline insert_iterator<_Container>
inserter(_Container& __x, _Iterator __i)
{
return insert_iterator<_Container>(__x,
typename _Container::iterator(__i));
}
// @} group iterators
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// This iterator adapter is @a normal in the sense that it does not
// change the semantics of any of the operators of its iterator
// parameter. Its primary purpose is to convert an iterator that is
// not a class, e.g. a pointer, into an iterator that is a class.
// The _Container parameter exists solely so that different containers
// using this template can instantiate different types, even if the
// _Iterator parameter is the same.
using std::iterator_traits;
using std::iterator;
template<typename _Iterator, typename _Container>
class __normal_iterator
{
protected:
_Iterator _M_current;
typedef iterator_traits<_Iterator> __traits_type;
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::iterator_category iterator_category;
typedef typename __traits_type::value_type value_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::reference reference;
typedef typename __traits_type::pointer pointer;
_GLIBCXX_CONSTEXPR __normal_iterator() _GLIBCXX_NOEXCEPT
: _M_current(_Iterator()) { }
explicit
__normal_iterator(const _Iterator& __i) _GLIBCXX_NOEXCEPT
: _M_current(__i) { }
// Allow iterator to const_iterator conversion
template<typename _Iter>
__normal_iterator(const __normal_iterator<_Iter,
typename __enable_if<
(std::__are_same<_Iter, typename _Container::pointer>::__value),
_Container>::__type>& __i) _GLIBCXX_NOEXCEPT
: _M_current(__i.base()) { }
// Forward iterator requirements
reference
operator*() const _GLIBCXX_NOEXCEPT
{ return *_M_current; }
pointer
operator->() const _GLIBCXX_NOEXCEPT
{ return _M_current; }
__normal_iterator&
operator++() _GLIBCXX_NOEXCEPT
{
++_M_current;
return *this;
}
__normal_iterator
operator++(int) _GLIBCXX_NOEXCEPT
{ return __normal_iterator(_M_current++); }
// Bidirectional iterator requirements
__normal_iterator&
operator--() _GLIBCXX_NOEXCEPT
{
--_M_current;
return *this;
}
__normal_iterator
operator--(int) _GLIBCXX_NOEXCEPT
{ return __normal_iterator(_M_current--); }
// Random access iterator requirements
reference
operator[](difference_type __n) const _GLIBCXX_NOEXCEPT
{ return _M_current[__n]; }
__normal_iterator&
operator+=(difference_type __n) _GLIBCXX_NOEXCEPT
{ _M_current += __n; return *this; }
__normal_iterator
operator+(difference_type __n) const _GLIBCXX_NOEXCEPT
{ return __normal_iterator(_M_current + __n); }
__normal_iterator&
operator-=(difference_type __n) _GLIBCXX_NOEXCEPT
{ _M_current -= __n; return *this; }
__normal_iterator
operator-(difference_type __n) const _GLIBCXX_NOEXCEPT
{ return __normal_iterator(_M_current - __n); }
const _Iterator&
base() const _GLIBCXX_NOEXCEPT
{ return _M_current; }
};
// Note: In what follows, the left- and right-hand-side iterators are
// allowed to vary in types (conceptually in cv-qualification) so that
// comparison between cv-qualified and non-cv-qualified iterators be
// valid. However, the greedy and unfriendly operators in std::rel_ops
// will make overload resolution ambiguous (when in scope) if we don't
// provide overloads whose operands are of the same type. Can someone
// remind me what generic programming is about? -- Gaby
// Forward iterator requirements
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() == __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() == __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() != __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() != __rhs.base(); }
// Random access iterator requirements
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() < __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() < __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() > __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() > __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() <= __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() <= __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() >= __rhs.base(); }
template<typename _Iterator, typename _Container>
inline bool
operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() >= __rhs.base(); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// According to the resolution of DR179 not only the various comparison
// operators but also operator- must accept mixed iterator/const_iterator
// parameters.
template<typename _IteratorL, typename _IteratorR, typename _Container>
#if __cplusplus >= 201103L
// DR 685.
inline auto
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept
-> decltype(__lhs.base() - __rhs.base())
#else
# 903 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
inline typename __normal_iterator<_IteratorL, _Container>::difference_type
operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
#endif
# 907 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
{ return __lhs.base() - __rhs.base(); }
template<typename _Iterator, typename _Container>
inline typename __normal_iterator<_Iterator, _Container>::difference_type
operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
const __normal_iterator<_Iterator, _Container>& __rhs)
_GLIBCXX_NOEXCEPT
{ return __lhs.base() - __rhs.base(); }
template<typename _Iterator, typename _Container>
inline __normal_iterator<_Iterator, _Container>
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
__n, const __normal_iterator<_Iterator, _Container>& __i)
_GLIBCXX_NOEXCEPT
{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#if __cplusplus >= 201103L
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup iterators
* @{
*/
// 24.4.3 Move iterators
/**
* Class template move_iterator is an iterator adapter with the same
* behavior as the underlying iterator except that its dereference
* operator implicitly converts the value returned by the underlying
* iterator's dereference operator to an rvalue reference. Some
* generic algorithms can be called with move iterators to replace
* copying with moving.
*/
template<typename _Iterator>
class move_iterator
{
protected:
_Iterator _M_current;
typedef iterator_traits<_Iterator> __traits_type;
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::iterator_category iterator_category;
typedef typename __traits_type::value_type value_type;
typedef typename __traits_type::difference_type difference_type;
// NB: DR 680.
typedef _Iterator pointer;
typedef value_type&& reference;
move_iterator()
: _M_current() { }
explicit
move_iterator(iterator_type __i)
: _M_current(__i) { }
template<typename _Iter>
move_iterator(const move_iterator<_Iter>& __i)
: _M_current(__i.base()) { }
iterator_type
base() const
{ return _M_current; }
reference
operator*() const
{ return std::move(*_M_current); }
pointer
operator->() const
{ return _M_current; }
move_iterator&
operator++()
{
++_M_current;
return *this;
}
move_iterator
operator++(int)
{
move_iterator __tmp = *this;
++_M_current;
return __tmp;
}
move_iterator&
operator--()
{
--_M_current;
return *this;
}
move_iterator
operator--(int)
{
move_iterator __tmp = *this;
--_M_current;
return __tmp;
}
move_iterator
operator+(difference_type __n) const
{ return move_iterator(_M_current + __n); }
move_iterator&
operator+=(difference_type __n)
{
_M_current += __n;
return *this;
}
move_iterator
operator-(difference_type __n) const
{ return move_iterator(_M_current - __n); }
move_iterator&
operator-=(difference_type __n)
{
_M_current -= __n;
return *this;
}
reference
operator[](difference_type __n) const
{ return std::move(_M_current[__n]); }
};
// Note: See __normal_iterator operators note from Gaby to understand
// why there are always 2 versions for most of the move_iterator
// operators.
template<typename _IteratorL, typename _IteratorR>
inline bool
operator==(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return __x.base() == __y.base(); }
template<typename _Iterator>
inline bool
operator==(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return __x.base() == __y.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator!=(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return !(__x == __y); }
template<typename _Iterator>
inline bool
operator!=(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return !(__x == __y); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return __x.base() < __y.base(); }
template<typename _Iterator>
inline bool
operator<(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return __x.base() < __y.base(); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator<=(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return !(__y < __x); }
template<typename _Iterator>
inline bool
operator<=(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return !(__y < __x); }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return __y < __x; }
template<typename _Iterator>
inline bool
operator>(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return __y < __x; }
template<typename _IteratorL, typename _IteratorR>
inline bool
operator>=(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
{ return !(__x < __y); }
template<typename _Iterator>
inline bool
operator>=(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
{ return !(__x < __y); }
// DR 685.
template<typename _IteratorL, typename _IteratorR>
inline auto
operator-(const move_iterator<_IteratorL>& __x,
const move_iterator<_IteratorR>& __y)
-> decltype(__x.base() - __y.base())
{ return __x.base() - __y.base(); }
template<typename _Iterator>
inline auto
operator-(const move_iterator<_Iterator>& __x,
const move_iterator<_Iterator>& __y)
-> decltype(__x.base() - __y.base())
{ return __x.base() - __y.base(); }
template<typename _Iterator>
inline move_iterator<_Iterator>
operator+(typename move_iterator<_Iterator>::difference_type __n,
const move_iterator<_Iterator>& __x)
{ return __x + __n; }
template<typename _Iterator>
inline move_iterator<_Iterator>
make_move_iterator(_Iterator __i)
{ return move_iterator<_Iterator>(__i); }
template<typename _Iterator, typename _ReturnType
= typename conditional<__move_if_noexcept_cond
<typename iterator_traits<_Iterator>::value_type>::value,
_Iterator, move_iterator<_Iterator>>::type>
inline _ReturnType
__make_move_if_noexcept_iterator(_Iterator __i)
{ return _ReturnType(__i); }
// @} group iterators
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter)
#define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) \
std::__make_move_if_noexcept_iterator(_Iter)
#else
# 1161 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter)
#define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) (_Iter)
#endif // C++11
# 1164 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
#endif
# 1166 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_iterator.h" 3
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/concept_check.h>
#endif /* expanded by -frewrite-includes */
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <debug/debug.h>
#endif /* expanded by -frewrite-includes */
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h> // For std::swap and _GLIBCXX_MOVE
#endif /* expanded by -frewrite-includes */
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/predefined_ops.h>
#endif /* expanded by -frewrite-includes */
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/predefined_ops.h" 1 3
// Default predicates for internal use -*- C++ -*-
// Copyright (C) 2013-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file predefined_ops.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _GLIBCXX_PREDEFINED_OPS_H
#define _GLIBCXX_PREDEFINED_OPS_H 1
namespace __gnu_cxx
{
namespace __ops
{
struct _Iter_less_iter
{
template<typename _Iterator1, typename _Iterator2>
bool
operator()(_Iterator1 __it1, _Iterator2 __it2) const
{ return *__it1 < *__it2; }
};
inline _Iter_less_iter
__iter_less_iter()
{ return _Iter_less_iter(); }
struct _Iter_less_val
{
template<typename _Iterator, typename _Value>
bool
operator()(_Iterator __it, _Value& __val) const
{ return *__it < __val; }
};
inline _Iter_less_val
__iter_less_val()
{ return _Iter_less_val(); }
inline _Iter_less_val
__iter_comp_val(_Iter_less_iter)
{ return _Iter_less_val(); }
struct _Val_less_iter
{
template<typename _Value, typename _Iterator>
bool
operator()(_Value& __val, _Iterator __it) const
{ return __val < *__it; }
};
inline _Val_less_iter
__val_less_iter()
{ return _Val_less_iter(); }
inline _Val_less_iter
__val_comp_iter(_Iter_less_iter)
{ return _Val_less_iter(); }
struct _Iter_equal_to_iter
{
template<typename _Iterator1, typename _Iterator2>
bool
operator()(_Iterator1 __it1, _Iterator2 __it2) const
{ return *__it1 == *__it2; }
};
inline _Iter_equal_to_iter
__iter_equal_to_iter()
{ return _Iter_equal_to_iter(); }
struct _Iter_equal_to_val
{
template<typename _Iterator, typename _Value>
bool
operator()(_Iterator __it, _Value& __val) const
{ return *__it == __val; }
};
inline _Iter_equal_to_val
__iter_equal_to_val()
{ return _Iter_equal_to_val(); }
inline _Iter_equal_to_val
__iter_comp_val(_Iter_equal_to_iter)
{ return _Iter_equal_to_val(); }
template<typename _Compare>
struct _Iter_comp_iter
{
_Compare _M_comp;
_Iter_comp_iter(_Compare __comp)
: _M_comp(__comp)
{ }
template<typename _Iterator1, typename _Iterator2>
bool
operator()(_Iterator1 __it1, _Iterator2 __it2)
{ return bool(_M_comp(*__it1, *__it2)); }
};
template<typename _Compare>
inline _Iter_comp_iter<_Compare>
__iter_comp_iter(_Compare __comp)
{ return _Iter_comp_iter<_Compare>(__comp); }
template<typename _Compare>
struct _Iter_comp_val
{
_Compare _M_comp;
_Iter_comp_val(_Compare __comp)
: _M_comp(__comp)
{ }
template<typename _Iterator, typename _Value>
bool
operator()(_Iterator __it, _Value& __val)
{ return bool(_M_comp(*__it, __val)); }
};
template<typename _Compare>
inline _Iter_comp_val<_Compare>
__iter_comp_val(_Compare __comp)
{ return _Iter_comp_val<_Compare>(__comp); }
template<typename _Compare>
inline _Iter_comp_val<_Compare>
__iter_comp_val(_Iter_comp_iter<_Compare> __comp)
{ return _Iter_comp_val<_Compare>(__comp._M_comp); }
template<typename _Compare>
struct _Val_comp_iter
{
_Compare _M_comp;
_Val_comp_iter(_Compare __comp)
: _M_comp(__comp)
{ }
template<typename _Value, typename _Iterator>
bool
operator()(_Value& __val, _Iterator __it)
{ return bool(_M_comp(__val, *__it)); }
};
template<typename _Compare>
inline _Val_comp_iter<_Compare>
__val_comp_iter(_Compare __comp)
{ return _Val_comp_iter<_Compare>(__comp); }
template<typename _Compare>
inline _Val_comp_iter<_Compare>
__val_comp_iter(_Iter_comp_iter<_Compare> __comp)
{ return _Val_comp_iter<_Compare>(__comp._M_comp); }
template<typename _Value>
struct _Iter_equals_val
{
_Value& _M_value;
_Iter_equals_val(_Value& __value)
: _M_value(__value)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return *__it == _M_value; }
};
template<typename _Value>
inline _Iter_equals_val<_Value>
__iter_equals_val(_Value& __val)
{ return _Iter_equals_val<_Value>(__val); }
template<typename _Iterator1>
struct _Iter_equals_iter
{
typename std::iterator_traits<_Iterator1>::reference _M_ref;
_Iter_equals_iter(_Iterator1 __it1)
: _M_ref(*__it1)
{ }
template<typename _Iterator2>
bool
operator()(_Iterator2 __it2)
{ return *__it2 == _M_ref; }
};
template<typename _Iterator>
inline _Iter_equals_iter<_Iterator>
__iter_comp_iter(_Iter_equal_to_iter, _Iterator __it)
{ return _Iter_equals_iter<_Iterator>(__it); }
template<typename _Predicate>
struct _Iter_pred
{
_Predicate _M_pred;
_Iter_pred(_Predicate __pred)
: _M_pred(__pred)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return bool(_M_pred(*__it)); }
};
template<typename _Predicate>
inline _Iter_pred<_Predicate>
__pred_iter(_Predicate __pred)
{ return _Iter_pred<_Predicate>(__pred); }
template<typename _Compare, typename _Value>
struct _Iter_comp_to_val
{
_Compare _M_comp;
_Value& _M_value;
_Iter_comp_to_val(_Compare __comp, _Value& __value)
: _M_comp(__comp), _M_value(__value)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return bool(_M_comp(*__it, _M_value)); }
};
template<typename _Compare, typename _Value>
_Iter_comp_to_val<_Compare, _Value>
__iter_comp_val(_Compare __comp, _Value &__val)
{ return _Iter_comp_to_val<_Compare, _Value>(__comp, __val); }
template<typename _Compare, typename _Iterator1>
struct _Iter_comp_to_iter
{
_Compare _M_comp;
typename std::iterator_traits<_Iterator1>::reference _M_ref;
_Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1)
: _M_comp(__comp), _M_ref(*__it1)
{ }
template<typename _Iterator2>
bool
operator()(_Iterator2 __it2)
{ return bool(_M_comp(*__it2, _M_ref)); }
};
template<typename _Compare, typename _Iterator>
inline _Iter_comp_to_iter<_Compare, _Iterator>
__iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it)
{ return _Iter_comp_to_iter<_Compare, _Iterator>(__comp._M_comp, __it); }
template<typename _Predicate>
struct _Iter_negate
{
_Predicate _M_pred;
_Iter_negate(_Predicate __pred)
: _M_pred(__pred)
{ }
template<typename _Iterator>
bool
operator()(_Iterator __it)
{ return !bool(_M_pred(*__it)); }
};
template<typename _Predicate>
inline _Iter_negate<_Predicate>
__negate(_Iter_pred<_Predicate> __pred)
{ return _Iter_negate<_Predicate>(__pred._M_pred); }
} // namespace __ops
} // namespace __gnu_cxx
#endif
# 305 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/predefined_ops.h" 3
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus < 201103L
// See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a
// nutshell, we are partially implementing the resolution of DR 187,
// when it's safe, i.e., the value_types are equal.
template<bool _BoolType>
struct __iter_swap
{
template<typename _ForwardIterator1, typename _ForwardIterator2>
static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
_ValueType1 __tmp = _GLIBCXX_MOVE(*__a);
*__a = _GLIBCXX_MOVE(*__b);
*__b = _GLIBCXX_MOVE(__tmp);
}
};
template<>
struct __iter_swap<true>
{
template<typename _ForwardIterator1, typename _ForwardIterator2>
static void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
swap(*__a, *__b);
}
};
#endif
# 107 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
/**
* @brief Swaps the contents of two iterators.
* @ingroup mutating_algorithms
* @param __a An iterator.
* @param __b Another iterator.
* @return Nothing.
*
* This function swaps the values pointed to by two iterators, not the
* iterators themselves.
*/
template<typename _ForwardIterator1, typename _ForwardIterator2>
inline void
iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
{
// concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator1>)
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator2>)
#if __cplusplus < 201103L
typedef typename iterator_traits<_ForwardIterator1>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator2>::value_type
_ValueType2;
__glibcxx_function_requires(_ConvertibleConcept<_ValueType1,
_ValueType2>)
__glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
_ValueType1>)
typedef typename iterator_traits<_ForwardIterator1>::reference
_ReferenceType1;
typedef typename iterator_traits<_ForwardIterator2>::reference
_ReferenceType2;
std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
&& __are_same<_ValueType1&, _ReferenceType1>::__value
&& __are_same<_ValueType2&, _ReferenceType2>::__value>::
iter_swap(__a, __b);
#else
# 148 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
swap(*__a, *__b);
#endif
# 150 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
}
/**
* @brief Swap the elements of two sequences.
* @ingroup mutating_algorithms
* @param __first1 A forward iterator.
* @param __last1 A forward iterator.
* @param __first2 A forward iterator.
* @return An iterator equal to @p first2+(last1-first1).
*
* Swaps each element in the range @p [first1,last1) with the
* corresponding element in the range @p [first2,(last1-first1)).
* The ranges must not overlap.
*/
template<typename _ForwardIterator1, typename _ForwardIterator2>
_ForwardIterator2
swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
_ForwardIterator2 __first2)
{
// concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator1>)
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator2>)
__glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, ++__first2)
std::iter_swap(__first1, __first2);
return __first2;
}
/**
* @brief This does what you think it does.
* @ingroup sorting_algorithms
* @param __a A thing of arbitrary type.
* @param __b Another thing of arbitrary type.
* @return The lesser of the parameters.
*
* This is the simple classic generic implementation. It will work on
* temporary expressions, since they are only evaluated once, unlike a
* preprocessor macro.
*/
template<typename _Tp>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b)
{
// concept requirements
__glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
//return __b < __a ? __b : __a;
if (__b < __a)
return __b;
return __a;
}
/**
* @brief This does what you think it does.
* @ingroup sorting_algorithms
* @param __a A thing of arbitrary type.
* @param __b Another thing of arbitrary type.
* @return The greater of the parameters.
*
* This is the simple classic generic implementation. It will work on
* temporary expressions, since they are only evaluated once, unlike a
* preprocessor macro.
*/
template<typename _Tp>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b)
{
// concept requirements
__glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
//return __a < __b ? __b : __a;
if (__a < __b)
return __b;
return __a;
}
/**
* @brief This does what you think it does.
* @ingroup sorting_algorithms
* @param __a A thing of arbitrary type.
* @param __b Another thing of arbitrary type.
* @param __comp A @link comparison_functors comparison functor@endlink.
* @return The lesser of the parameters.
*
* This will work on temporary expressions, since they are only evaluated
* once, unlike a preprocessor macro.
*/
template<typename _Tp, typename _Compare>
inline const _Tp&
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
//return __comp(__b, __a) ? __b : __a;
if (__comp(__b, __a))
return __b;
return __a;
}
/**
* @brief This does what you think it does.
* @ingroup sorting_algorithms
* @param __a A thing of arbitrary type.
* @param __b Another thing of arbitrary type.
* @param __comp A @link comparison_functors comparison functor@endlink.
* @return The greater of the parameters.
*
* This will work on temporary expressions, since they are only evaluated
* once, unlike a preprocessor macro.
*/
template<typename _Tp, typename _Compare>
inline const _Tp&
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
{
//return __comp(__a, __b) ? __b : __a;
if (__comp(__a, __b))
return __b;
return __a;
}
// If _Iterator is a __normal_iterator return its base (a plain pointer,
// normally) otherwise return it untouched. See copy, fill, ...
template<typename _Iterator>
struct _Niter_base
: _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value>
{ };
template<typename _Iterator>
inline typename _Niter_base<_Iterator>::iterator_type
__niter_base(_Iterator __it)
{ return std::_Niter_base<_Iterator>::_S_base(__it); }
// Likewise, for move_iterator.
template<typename _Iterator>
struct _Miter_base
: _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value>
{ };
template<typename _Iterator>
inline typename _Miter_base<_Iterator>::iterator_type
__miter_base(_Iterator __it)
{ return std::_Miter_base<_Iterator>::_S_base(__it); }
// All of these auxiliary structs serve two purposes. (1) Replace
// calls to copy with memmove whenever possible. (Memmove, not memcpy,
// because the input and output ranges are permitted to overlap.)
// (2) If we're using random access iterators, then write the loop as
// a for loop with an explicit count.
template<bool, bool, typename>
struct __copy_move
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
};
#if __cplusplus >= 201103L
template<typename _Category>
struct __copy_move<true, false, _Category>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
for (; __first != __last; ++__result, ++__first)
*__result = std::move(*__first);
return __result;
}
};
#endif
# 325 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
template<>
struct __copy_move<false, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = *__first;
++__first;
++__result;
}
return __result;
}
};
#if __cplusplus >= 201103L
template<>
struct __copy_move<true, false, random_access_iterator_tag>
{
template<typename _II, typename _OI>
static _OI
__copy_m(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::difference_type _Distance;
for(_Distance __n = __last - __first; __n > 0; --__n)
{
*__result = std::move(*__first);
++__first;
++__result;
}
return __result;
}
};
#endif
# 363 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
template<bool _IsMove>
struct __copy_move<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
#if __cplusplus >= 201103L
// trivial types can have deleted assignment
static_assert( is_copy_assignable<_Tp>::value,
"type is not assignable" );
#endif
# 376 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
const ptrdiff_t _Num = __last - __first;
if (_Num)
__builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
return __result + _Num;
}
};
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a(_II __first, _II __last, _OI __result)
{
typedef typename iterator_traits<_II>::value_type _ValueTypeI;
typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
typedef typename iterator_traits<_II>::iterator_category _Category;
const bool __simple = (__is_trivial(_ValueTypeI)
&& __is_pointer<_II>::__value
&& __is_pointer<_OI>::__value
&& __are_same<_ValueTypeI, _ValueTypeO>::__value);
return std::__copy_move<_IsMove, __simple,
_Category>::__copy_m(__first, __last, __result);
}
// Helpers for streambuf iterators (either istream or ostream).
// NB: avoid including <iosfwd>, relatively large.
template<typename _CharT>
struct char_traits;
template<typename _CharT, typename _Traits>
class istreambuf_iterator;
template<typename _CharT, typename _Traits>
class ostreambuf_iterator;
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(_CharT*, _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
__copy_move_a2(const _CharT*, const _CharT*,
ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
template<bool _IsMove, typename _II, typename _OI>
inline _OI
__copy_move_a2(_II __first, _II __last, _OI __result)
{
return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
std::__niter_base(__last),
std::__niter_base(__result)));
}
/**
* @brief Copies the range [first,last) into result.
* @ingroup mutating_algorithms
* @param __first An input iterator.
* @param __last An input iterator.
* @param __result An output iterator.
* @return result + (first - last)
*
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling). Result may not be contained within
* [first,last); the copy_backward function should be used instead.
*
* Note that the end of the output range is permitted to be contained
* within [first,last).
*/
template<typename _II, typename _OI>
inline _OI
copy(_II __first, _II __last, _OI __result)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II>)
__glibcxx_function_requires(_OutputIteratorConcept<_OI,
typename iterator_traits<_II>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
(std::__miter_base(__first), std::__miter_base(__last),
__result));
}
#if __cplusplus >= 201103L
/**
* @brief Moves the range [first,last) into result.
* @ingroup mutating_algorithms
* @param __first An input iterator.
* @param __last An input iterator.
* @param __result An output iterator.
* @return result + (first - last)
*
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling). Result may not be contained within
* [first,last); the move_backward function should be used instead.
*
* Note that the end of the output range is permitted to be contained
* within [first,last).
*/
template<typename _II, typename _OI>
inline _OI
move(_II __first, _II __last, _OI __result)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II>)
__glibcxx_function_requires(_OutputIteratorConcept<_OI,
typename iterator_traits<_II>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return std::__copy_move_a2<true>(std::__miter_base(__first),
std::__miter_base(__last), __result);
}
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
#else
# 503 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp)
#endif
# 505 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
template<bool, bool, typename>
struct __copy_move_backward
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
};
#if __cplusplus >= 201103L
template<typename _Category>
struct __copy_move_backward<true, false, _Category>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
while (__first != __last)
*--__result = std::move(*--__last);
return __result;
}
};
#endif
# 533 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
template<>
struct __copy_move_backward<false, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
};
#if __cplusplus >= 201103L
template<>
struct __copy_move_backward<true, false, random_access_iterator_tag>
{
template<typename _BI1, typename _BI2>
static _BI2
__copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
{
typename iterator_traits<_BI1>::difference_type __n;
for (__n = __last - __first; __n > 0; --__n)
*--__result = std::move(*--__last);
return __result;
}
};
#endif
# 563 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
template<bool _IsMove>
struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
{
template<typename _Tp>
static _Tp*
__copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
#if __cplusplus >= 201103L
// trivial types can have deleted assignment
static_assert( is_copy_assignable<_Tp>::value,
"type is not assignable" );
#endif
# 576 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
const ptrdiff_t _Num = __last - __first;
if (_Num)
__builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
{
typedef typename iterator_traits<_BI1>::value_type _ValueType1;
typedef typename iterator_traits<_BI2>::value_type _ValueType2;
typedef typename iterator_traits<_BI1>::iterator_category _Category;
const bool __simple = (__is_trivial(_ValueType1)
&& __is_pointer<_BI1>::__value
&& __is_pointer<_BI2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
return std::__copy_move_backward<_IsMove, __simple,
_Category>::__copy_move_b(__first,
__last,
__result);
}
template<bool _IsMove, typename _BI1, typename _BI2>
inline _BI2
__copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
{
return _BI2(std::__copy_move_backward_a<_IsMove>
(std::__niter_base(__first), std::__niter_base(__last),
std::__niter_base(__result)));
}
/**
* @brief Copies the range [first,last) into result.
* @ingroup mutating_algorithms
* @param __first A bidirectional iterator.
* @param __last A bidirectional iterator.
* @param __result A bidirectional iterator.
* @return result - (first - last)
*
* The function has the same effect as copy, but starts at the end of the
* range and works its way to the start, returning the start of the result.
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling).
*
* Result may not be in the range (first,last]. Use copy instead. Note
* that the start of the output range may overlap [first,last).
*/
template<typename _BI1, typename _BI2>
inline _BI2
copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
// concept requirements
__glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
__glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
__glibcxx_function_requires(_ConvertibleConcept<
typename iterator_traits<_BI1>::value_type,
typename iterator_traits<_BI2>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
(std::__miter_base(__first), std::__miter_base(__last),
__result));
}
#if __cplusplus >= 201103L
/**
* @brief Moves the range [first,last) into result.
* @ingroup mutating_algorithms
* @param __first A bidirectional iterator.
* @param __last A bidirectional iterator.
* @param __result A bidirectional iterator.
* @return result - (first - last)
*
* The function has the same effect as move, but starts at the end of the
* range and works its way to the start, returning the start of the result.
* This inline function will boil down to a call to @c memmove whenever
* possible. Failing that, if random access iterators are passed, then the
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling).
*
* Result may not be in the range (first,last]. Use move instead. Note
* that the start of the output range may overlap [first,last).
*/
template<typename _BI1, typename _BI2>
inline _BI2
move_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
// concept requirements
__glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
__glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
__glibcxx_function_requires(_ConvertibleConcept<
typename iterator_traits<_BI1>::value_type,
typename iterator_traits<_BI2>::value_type>)
__glibcxx_requires_valid_range(__first, __last);
return std::__copy_move_backward_a2<true>(std::__miter_base(__first),
std::__miter_base(__last),
__result);
}
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
#else
# 683 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp)
#endif
# 685 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
for (; __first != __last; ++__first)
*__first = __value;
}
template<typename _ForwardIterator, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
__fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __value)
{
const _Tp __tmp = __value;
for (; __first != __last; ++__first)
*__first = __tmp;
}
// Specialization: for char types we can use memset.
template<typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
__fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
{
const _Tp __tmp = __c;
__builtin_memset(__first, static_cast<unsigned char>(__tmp),
__last - __first);
}
/**
* @brief Fills the range [first,last) with copies of value.
* @ingroup mutating_algorithms
* @param __first A forward iterator.
* @param __last A forward iterator.
* @param __value A reference-to-const of arbitrary type.
* @return Nothing.
*
* This function fills a range with copies of the same value. For char
* types filling contiguous areas of memory, this becomes an inline call
* to @c memset or @c wmemset.
*/
template<typename _ForwardIterator, typename _Tp>
inline void
fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
// concept requirements
__glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
_ForwardIterator>)
__glibcxx_requires_valid_range(__first, __last);
std::__fill_a(std::__niter_base(__first), std::__niter_base(__last),
__value);
}
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __value;
return __first;
}
template<typename _OutputIterator, typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
__fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
{
const _Tp __tmp = __value;
for (__decltype(__n + 0) __niter = __n;
__niter > 0; --__niter, ++__first)
*__first = __tmp;
return __first;
}
template<typename _Size, typename _Tp>
inline typename
__gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
__fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
{
std::__fill_a(__first, __first + __n, __c);
return __first + __n;
}
/**
* @brief Fills the range [first,first+n) with copies of value.
* @ingroup mutating_algorithms
* @param __first An output iterator.
* @param __n The count of copies to perform.
* @param __value A reference-to-const of arbitrary type.
* @return The iterator at first+n.
*
* This function fills a range with copies of the same value. For char
* types filling contiguous areas of memory, this becomes an inline call
* to @c memset or @ wmemset.
*
* _GLIBCXX_RESOLVE_LIB_DEFECTS
* DR 865. More algorithms that throw away information
*/
template<typename _OI, typename _Size, typename _Tp>
inline _OI
fill_n(_OI __first, _Size __n, const _Tp& __value)
{
// concept requirements
__glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value));
}
template<bool _BoolType>
struct __equal
{
template<typename _II1, typename _II2>
static bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
for (; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
return false;
return true;
}
};
template<>
struct __equal<true>
{
template<typename _Tp>
static bool
equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
{
return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
* (__last1 - __first1));
}
};
template<typename _II1, typename _II2>
inline bool
__equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple = ((__is_integer<_ValueType1>::__value
|| __is_pointer<_ValueType1>::__value)
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value
&& __are_same<_ValueType1, _ValueType2>::__value);
return std::__equal<__simple>::equal(__first1, __last1, __first2);
}
template<typename, typename>
struct __lc_rai
{
template<typename _II1, typename _II2>
static _II1
__newlast1(_II1, _II1 __last1, _II2, _II2)
{ return __last1; }
template<typename _II>
static bool
__cnd2(_II __first, _II __last)
{ return __first != __last; }
};
template<>
struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
{
template<typename _RAI1, typename _RAI2>
static _RAI1
__newlast1(_RAI1 __first1, _RAI1 __last1,
_RAI2 __first2, _RAI2 __last2)
{
const typename iterator_traits<_RAI1>::difference_type
__diff1 = __last1 - __first1;
const typename iterator_traits<_RAI2>::difference_type
__diff2 = __last2 - __first2;
return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
}
template<typename _RAI>
static bool
__cnd2(_RAI, _RAI)
{ return true; }
};
template<typename _II1, typename _II2, typename _Compare>
bool
__lexicographical_compare_impl(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2,
_Compare __comp)
{
typedef typename iterator_traits<_II1>::iterator_category _Category1;
typedef typename iterator_traits<_II2>::iterator_category _Category2;
typedef std::__lc_rai<_Category1, _Category2> __rai_type;
__last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
++__first1, ++__first2)
{
if (__comp(__first1, __first2))
return true;
if (__comp(__first2, __first1))
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
template<bool _BoolType>
struct __lexicographical_compare
{
template<typename _II1, typename _II2>
static bool __lc(_II1, _II1, _II2, _II2);
};
template<bool _BoolType>
template<typename _II1, typename _II2>
bool
__lexicographical_compare<_BoolType>::
__lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
{
return std::__lexicographical_compare_impl(__first1, __last1,
__first2, __last2,
__gnu_cxx::__ops::__iter_less_iter());
}
template<>
struct __lexicographical_compare<true>
{
template<typename _Tp, typename _Up>
static bool
__lc(const _Tp* __first1, const _Tp* __last1,
const _Up* __first2, const _Up* __last2)
{
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
const int __result = __builtin_memcmp(__first1, __first2,
std::min(__len1, __len2));
return __result != 0 ? __result < 0 : __len1 < __len2;
}
};
template<typename _II1, typename _II2>
inline bool
__lexicographical_compare_aux(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
const bool __simple =
(__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
&& !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
&& !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
&& __is_pointer<_II1>::__value
&& __is_pointer<_II2>::__value);
return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
__first2, __last2);
}
template<typename _ForwardIterator, typename _Tp, typename _Compare>
_ForwardIterator
__lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val, _Compare __comp)
{
typedef typename iterator_traits<_ForwardIterator>::difference_type
_DistanceType;
_DistanceType __len = std::distance(__first, __last);
while (__len > 0)
{
_DistanceType __half = __len >> 1;
_ForwardIterator __middle = __first;
std::advance(__middle, __half);
if (__comp(__middle, __val))
{
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else
__len = __half;
}
return __first;
}
/**
* @brief Finds the first position in which @a val could be inserted
* without changing the ordering.
* @param __first An iterator.
* @param __last Another iterator.
* @param __val The search term.
* @return An iterator pointing to the first element <em>not less
* than</em> @a val, or end() if every element is less than
* @a val.
* @ingroup binary_search_algorithms
*/
template<typename _ForwardIterator, typename _Tp>
inline _ForwardIterator
lower_bound(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __val)
{
// concept requirements
__glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
__glibcxx_function_requires(_LessThanOpConcept<
typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
__glibcxx_requires_partitioned_lower(__first, __last, __val);
return std::__lower_bound(__first, __last, __val,
__gnu_cxx::__ops::__iter_less_val());
}
/// This is a helper function for the sort routines and for random.tcc.
// Precondition: __n > 0.
inline _GLIBCXX_CONSTEXPR int
__lg(int __n)
{ return sizeof(int) * __CHAR_BIT__ - 1 - __builtin_clz(__n); }
inline _GLIBCXX_CONSTEXPR unsigned
__lg(unsigned __n)
{ return sizeof(int) * __CHAR_BIT__ - 1 - __builtin_clz(__n); }
inline _GLIBCXX_CONSTEXPR long
__lg(long __n)
{ return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
inline _GLIBCXX_CONSTEXPR unsigned long
__lg(unsigned long __n)
{ return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
inline _GLIBCXX_CONSTEXPR long long
__lg(long long __n)
{ return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
inline _GLIBCXX_CONSTEXPR unsigned long long
__lg(unsigned long long __n)
{ return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
_GLIBCXX_END_NAMESPACE_VERSION
_GLIBCXX_BEGIN_NAMESPACE_ALGO
/**
* @brief Tests a range for element-wise equality.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @return A boolean true or false.
*
* This compares the elements of two ranges using @c == and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _II1, typename _II2>
inline bool
equal(_II1 __first1, _II1 __last1, _II2 __first2)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_function_requires(_EqualOpConcept<
typename iterator_traits<_II1>::value_type,
typename iterator_traits<_II2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
return std::__equal_aux(std::__niter_base(__first1),
std::__niter_base(__last1),
std::__niter_base(__first2));
}
/**
* @brief Tests a range for element-wise equality.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __binary_pred A binary predicate @link functors
* functor@endlink.
* @return A boolean true or false.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
_IIter2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
__glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
__glibcxx_requires_valid_range(__first1, __last1);
for (; __first1 != __last1; ++__first1, ++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
return false;
return true;
}
#if __cplusplus > 201103L
#define __cpp_lib_robust_nonmodifying_seq_ops 201304
/**
* @brief Tests a range for element-wise equality.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __last2 An input iterator.
* @return A boolean true or false.
*
* This compares the elements of two ranges using @c == and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _II1, typename _II2>
inline bool
equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_function_requires(_EqualOpConcept<
typename iterator_traits<_II1>::value_type,
typename iterator_traits<_II2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
using _RATag = random_access_iterator_tag;
using _Cat1 = typename iterator_traits<_II1>::iterator_category;
using _Cat2 = typename iterator_traits<_II2>::iterator_category;
using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>;
if (_RAIters())
{
auto __d1 = std::distance(__first1, __last1);
auto __d2 = std::distance(__first2, __last2);
if (__d1 != __d2)
return false;
return _GLIBCXX_STD_A::equal(__first1, __last1, __first2);
}
for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
return false;
return __first1 == __last1 && __first2 == __last2;
}
/**
* @brief Tests a range for element-wise equality.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __last2 An input iterator.
* @param __binary_pred A binary predicate @link functors
* functor@endlink.
* @return A boolean true or false.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns true or
* false depending on whether all of the corresponding elements of the
* ranges are equal.
*/
template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
_IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
__glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
using _RATag = random_access_iterator_tag;
using _Cat1 = typename iterator_traits<_IIter1>::iterator_category;
using _Cat2 = typename iterator_traits<_IIter2>::iterator_category;
using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>;
if (_RAIters())
{
auto __d1 = std::distance(__first1, __last1);
auto __d2 = std::distance(__first2, __last2);
if (__d1 != __d2)
return false;
return _GLIBCXX_STD_A::equal(__first1, __last1, __first2,
__binary_pred);
}
for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
return false;
return __first1 == __last1 && __first2 == __last2;
}
#endif
# 1189 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
/**
* @brief Performs @b dictionary comparison on ranges.
* @ingroup sorting_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __last2 An input iterator.
* @return A boolean true or false.
*
* <em>Returns true if the sequence of elements defined by the range
* [first1,last1) is lexicographically less than the sequence of elements
* defined by the range [first2,last2). Returns false otherwise.</em>
* (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
* then this is an inline call to @c memcmp.
*/
template<typename _II1, typename _II2>
inline bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2)
{
#ifdef _GLIBCXX_CONCEPT_CHECKS
// concept requirements
typedef typename iterator_traits<_II1>::value_type _ValueType1;
typedef typename iterator_traits<_II2>::value_type _ValueType2;
#endif
# 1215 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
__glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
return std::__lexicographical_compare_aux(std::__niter_base(__first1),
std::__niter_base(__last1),
std::__niter_base(__first2),
std::__niter_base(__last2));
}
/**
* @brief Performs @b dictionary comparison on ranges.
* @ingroup sorting_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __last2 An input iterator.
* @param __comp A @link comparison_functors comparison functor@endlink.
* @return A boolean true or false.
*
* The same as the four-parameter @c lexicographical_compare, but uses the
* comp parameter instead of @c <.
*/
template<typename _II1, typename _II2, typename _Compare>
inline bool
lexicographical_compare(_II1 __first1, _II1 __last1,
_II2 __first2, _II2 __last2, _Compare __comp)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_II1>)
__glibcxx_function_requires(_InputIteratorConcept<_II2>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
return std::__lexicographical_compare_impl
(__first1, __last1, __first2, __last2,
__gnu_cxx::__ops::__iter_comp_iter(__comp));
}
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
__mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
while (__first1 != __last1 && __binary_pred(__first1, __first2))
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
* @brief Finds the places in ranges which don't match.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @return A pair of iterators pointing to the first mismatch.
*
* This compares the elements of two ranges using @c == and returns a pair
* of iterators. The first iterator points into the first range, the
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIterator1, typename _InputIterator2>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_function_requires(_EqualOpConcept<
typename iterator_traits<_InputIterator1>::value_type,
typename iterator_traits<_InputIterator2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2,
__gnu_cxx::__ops::__iter_equal_to_iter());
}
/**
* @brief Finds the places in ranges which don't match.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __binary_pred A binary predicate @link functors
* functor@endlink.
* @return A pair of iterators pointing to the first mismatch.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns a pair
* of iterators. The first iterator points into the first range, the
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _BinaryPredicate __binary_pred)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_requires_valid_range(__first1, __last1);
return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2,
__gnu_cxx::__ops::__iter_comp_iter(__binary_pred));
}
#if __cplusplus > 201103L
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
pair<_InputIterator1, _InputIterator2>
__mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __binary_pred)
{
while (__first1 != __last1 && __first2 != __last2
&& __binary_pred(__first1, __first2))
{
++__first1;
++__first2;
}
return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
}
/**
* @brief Finds the places in ranges which don't match.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __last2 An input iterator.
* @return A pair of iterators pointing to the first mismatch.
*
* This compares the elements of two ranges using @c == and returns a pair
* of iterators. The first iterator points into the first range, the
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIterator1, typename _InputIterator2>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_function_requires(_EqualOpConcept<
typename iterator_traits<_InputIterator1>::value_type,
typename iterator_traits<_InputIterator2>::value_type>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2, __last2,
__gnu_cxx::__ops::__iter_equal_to_iter());
}
/**
* @brief Finds the places in ranges which don't match.
* @ingroup non_mutating_algorithms
* @param __first1 An input iterator.
* @param __last1 An input iterator.
* @param __first2 An input iterator.
* @param __last2 An input iterator.
* @param __binary_pred A binary predicate @link functors
* functor@endlink.
* @return A pair of iterators pointing to the first mismatch.
*
* This compares the elements of two ranges using the binary_pred
* parameter, and returns a pair
* of iterators. The first iterator points into the first range, the
* second iterator points into the second range, and the elements pointed
* to by the iterators are not equal.
*/
template<typename _InputIterator1, typename _InputIterator2,
typename _BinaryPredicate>
inline pair<_InputIterator1, _InputIterator2>
mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2,
_BinaryPredicate __binary_pred)
{
// concept requirements
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
__glibcxx_requires_valid_range(__first1, __last1);
__glibcxx_requires_valid_range(__first2, __last2);
return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2, __last2,
__gnu_cxx::__ops::__iter_comp_iter(__binary_pred));
}
#endif
# 1416 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
_GLIBCXX_END_NAMESPACE_ALGO
} // namespace std
// NB: This file is included within many other C++ includes, as a way
// of getting the base algorithms. So, make sure that parallel bits
// come in too if requested.
#ifdef _GLIBCXX_PARALLEL
#if 0 /* expanded by -frewrite-includes */
# include <parallel/algobase.h>
#endif /* expanded by -frewrite-includes */
# 1424 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 1425 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#endif
# 1426 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
#endif
# 1428 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_algobase.h" 3
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/allocator.h>
#endif /* expanded by -frewrite-includes */
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 1 3
// Allocators -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
* Copyright (c) 1996-1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/allocator.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _ALLOCATOR_H
#define _ALLOCATOR_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++allocator.h> // Define the base class to std::allocator.
#endif /* expanded by -frewrite-includes */
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++allocator.h" 1 3
// Base to std::allocator -*- C++ -*-
// Copyright (C) 2004-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/c++allocator.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _GLIBCXX_CXX_ALLOCATOR_H
#define _GLIBCXX_CXX_ALLOCATOR_H 1
#if 0 /* expanded by -frewrite-includes */
#include <ext/new_allocator.h>
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++allocator.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 1 3
// Allocator that wraps operator new -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/new_allocator.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _NEW_ALLOCATOR_H
#define _NEW_ALLOCATOR_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 32 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 1 3
// The -*- C++ -*- dynamic memory management header.
// Copyright (C) 1994-2014 Free Software Foundation, Inc.
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file new
* This is a Standard C++ Library header.
*
* The header @c new defines several functions to manage dynamic memory and
* handling memory allocation errors; see
* http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more.
*/
#ifndef _NEW
#define _NEW
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
#if 0 /* expanded by -frewrite-includes */
#include <exception>
#endif /* expanded by -frewrite-includes */
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 1 3
// Exception Handling support header for -*- C++ -*-
// Copyright (C) 1995-2014 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file exception
* This is a Standard C++ Library header.
*/
#ifndef __EXCEPTION__
#define __EXCEPTION__
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
#pragma GCC visibility push(default)
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/atomic_lockfree_defines.h>
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/atomic_lockfree_defines.h" 1 3
// -*- C++ -*- header.
// Copyright (C) 2008-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/atomic_lockfree_defines.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{atomic}
*/
#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H
#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/atomic_lockfree_defines.h" 3
/**
* @addtogroup atomics
* @{
*/
/**
* Lock-free property.
*
* 0 indicates that the types are never lock-free.
* 1 indicates that the types are sometimes lock-free.
* 2 indicates that the types are always lock-free.
*/
#if __cplusplus >= 201103L
#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
#endif
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/atomic_lockfree_defines.h" 3
// @} group atomics
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/atomic_lockfree_defines.h" 3
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 2 3
extern "C++" {
namespace std
{
/**
* @defgroup exceptions Exceptions
* @ingroup diagnostics
*
* Classes and functions for reporting errors via exception classes.
* @{
*/
/**
* @brief Base class for all library exceptions.
*
* This is the base class for all exceptions thrown by the standard
* library, and by certain language expressions. You are free to derive
* your own %exception classes, or use a different hierarchy, or to
* throw non-class data (e.g., fundamental types).
*/
class exception
{
public:
exception() _GLIBCXX_USE_NOEXCEPT { }
virtual ~exception() _GLIBCXX_USE_NOEXCEPT;
/** Returns a C-style character string describing the general cause
* of the current error. */
virtual const char* what() const _GLIBCXX_USE_NOEXCEPT;
};
/** If an %exception is thrown which is not listed in a function's
* %exception specification, one of these may be thrown. */
class bad_exception : public exception
{
public:
bad_exception() _GLIBCXX_USE_NOEXCEPT { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_exception() _GLIBCXX_USE_NOEXCEPT;
// See comment in eh_exception.cc.
virtual const char* what() const _GLIBCXX_USE_NOEXCEPT;
};
/// If you write a replacement %terminate handler, it must be of this type.
typedef void (*terminate_handler) ();
/// If you write a replacement %unexpected handler, it must be of this type.
typedef void (*unexpected_handler) ();
/// Takes a new handler function as an argument, returns the old function.
terminate_handler set_terminate(terminate_handler) _GLIBCXX_USE_NOEXCEPT;
#if __cplusplus >= 201103L
/// Return the current terminate handler.
terminate_handler get_terminate() noexcept;
#endif
# 99 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
/** The runtime will call this function if %exception handling must be
* abandoned for any reason. It can also be called by the user. */
void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
/// Takes a new handler function as an argument, returns the old function.
unexpected_handler set_unexpected(unexpected_handler) _GLIBCXX_USE_NOEXCEPT;
#if __cplusplus >= 201103L
/// Return the current unexpected handler.
unexpected_handler get_unexpected() noexcept;
#endif
# 111 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
/** The runtime will call this function if an %exception is thrown which
* violates the function's %exception specification. */
void unexpected() __attribute__ ((__noreturn__));
/** [18.6.4]/1: 'Returns true after completing evaluation of a
* throw-expression until either completing initialization of the
* exception-declaration in the matching handler or entering @c unexpected()
* due to the throw; or after entering @c terminate() for any reason
* other than an explicit call to @c terminate(). [Note: This includes
* stack unwinding [15.2]. end note]'
*
* 2: 'When @c uncaught_exception() is true, throwing an
* %exception can result in a call of @c terminate()
* (15.5.1).'
*/
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
// @} group exceptions
} // namespace std
namespace __gnu_cxx
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @brief A replacement for the standard terminate_handler which
* prints more information about the terminating exception (if any)
* on stderr.
*
* @ingroup exceptions
*
* Call
* @code
* std::set_terminate(__gnu_cxx::__verbose_terminate_handler)
* @endcode
* to use. For more info, see
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt02ch06s02.html
*
* In 3.4 and later, this is on by default.
*/
void __verbose_terminate_handler();
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
} // extern "C++"
#pragma GCC visibility pop
#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
#if 0 /* expanded by -frewrite-includes */
#include <bits/exception_ptr.h>
#endif /* expanded by -frewrite-includes */
# 162 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 1 3
// Exception Handling support header (exception_ptr class) for -*- C++ -*-
// Copyright (C) 2008-2014 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/exception_ptr.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{exception}
*/
#ifndef _EXCEPTION_PTR_H
#define _EXCEPTION_PTR_H
#pragma GCC visibility push(default)
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/exception_defines.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
#if ATOMIC_INT_LOCK_FREE < 2
# error This platform does not support exception propagation.
#endif
# 42 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
extern "C++" {
namespace std
{
class type_info;
/**
* @addtogroup exceptions
* @{
*/
namespace __exception_ptr
{
class exception_ptr;
}
using __exception_ptr::exception_ptr;
/** Obtain an exception_ptr to the currently handled exception. If there
* is none, or the currently handled exception is foreign, return the null
* value.
*/
exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT;
/// Throw the object pointed to by the exception_ptr.
void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__));
namespace __exception_ptr
{
/**
* @brief An opaque pointer to an arbitrary exception.
* @ingroup exceptions
*/
class exception_ptr
{
void* _M_exception_object;
explicit exception_ptr(void* __e) _GLIBCXX_USE_NOEXCEPT;
void _M_addref() _GLIBCXX_USE_NOEXCEPT;
void _M_release() _GLIBCXX_USE_NOEXCEPT;
void *_M_get() const _GLIBCXX_NOEXCEPT __attribute__ ((__pure__));
friend exception_ptr std::current_exception() _GLIBCXX_USE_NOEXCEPT;
friend void std::rethrow_exception(exception_ptr);
public:
exception_ptr() _GLIBCXX_USE_NOEXCEPT;
exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
#if __cplusplus >= 201103L
exception_ptr(nullptr_t) noexcept
: _M_exception_object(0)
{ }
exception_ptr(exception_ptr&& __o) noexcept
: _M_exception_object(__o._M_exception_object)
{ __o._M_exception_object = 0; }
#endif
# 103 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
#if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT)
typedef void (exception_ptr::*__safe_bool)();
// For construction from nullptr or 0.
exception_ptr(__safe_bool) _GLIBCXX_USE_NOEXCEPT;
#endif
# 110 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
exception_ptr&
operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
#if __cplusplus >= 201103L
exception_ptr&
operator=(exception_ptr&& __o) noexcept
{
exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
return *this;
}
#endif
# 122 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
~exception_ptr() _GLIBCXX_USE_NOEXCEPT;
void
swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT;
#ifdef _GLIBCXX_EH_PTR_COMPAT
// Retained for compatibility with CXXABI_1.3.
void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT
__attribute__ ((__const__));
bool operator!() const _GLIBCXX_USE_NOEXCEPT
__attribute__ ((__pure__));
operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT;
#endif
# 136 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
#if __cplusplus >= 201103L
explicit operator bool() const
{ return _M_exception_object; }
#endif
# 141 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
friend bool
operator==(const exception_ptr&, const exception_ptr&)
_GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
const class std::type_info*
__cxa_exception_type() const _GLIBCXX_USE_NOEXCEPT
__attribute__ ((__pure__));
};
bool
operator==(const exception_ptr&, const exception_ptr&)
_GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
bool
operator!=(const exception_ptr&, const exception_ptr&)
_GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
inline void
swap(exception_ptr& __lhs, exception_ptr& __rhs)
{ __lhs.swap(__rhs); }
} // namespace __exception_ptr
/// Obtain an exception_ptr pointing to a copy of the supplied object.
template<typename _Ex>
exception_ptr
make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
{
__try
{
#ifdef __EXCEPTIONS
throw __ex;
#endif
# 176 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
}
__catch(...)
{
return current_exception();
}
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 1130. copy_exception name misleading
/// Obtain an exception_ptr pointing to a copy of the supplied object.
/// This function is deprecated, use std::make_exception_ptr instead.
template<typename _Ex>
exception_ptr
copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT _GLIBCXX_DEPRECATED;
template<typename _Ex>
exception_ptr
copy_exception(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
{ return std::make_exception_ptr<_Ex>(__ex); }
// @} group exceptions
} // namespace std
} // extern "C++"
#pragma GCC visibility pop
#endif
# 204 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/exception_ptr.h" 3
# 163 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/nested_exception.h>
#endif /* expanded by -frewrite-includes */
# 163 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 1 3
// Nested Exception support header (nested_exception class) for -*- C++ -*-
// Copyright (C) 2009-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/nested_exception.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{exception}
*/
#ifndef _GLIBCXX_NESTED_EXCEPTION_H
#define _GLIBCXX_NESTED_EXCEPTION_H 1
#pragma GCC visibility push(default)
#if __cplusplus < 201103L
#if 0 /* expanded by -frewrite-includes */
# include <bits/c++0x_warning.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
#else
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
#if ATOMIC_INT_LOCK_FREE < 2
# error This platform does not support exception propagation.
#endif
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
extern "C++" {
namespace std
{
/**
* @addtogroup exceptions
* @{
*/
/// Exception class with exception_ptr data member.
class nested_exception
{
exception_ptr _M_ptr;
public:
nested_exception() noexcept : _M_ptr(current_exception()) { }
nested_exception(const nested_exception&) = default;
nested_exception& operator=(const nested_exception&) = default;
virtual ~nested_exception() noexcept;
void
rethrow_nested() const __attribute__ ((__noreturn__))
{ rethrow_exception(_M_ptr); }
exception_ptr
nested_ptr() const
{ return _M_ptr; }
};
template<typename _Except>
struct _Nested_exception : public _Except, public nested_exception
{
explicit _Nested_exception(_Except&& __ex)
: _Except(static_cast<_Except&&>(__ex))
{ }
};
template<typename _Ex>
struct __get_nested_helper
{
static const nested_exception*
_S_get(const _Ex& __ex)
{ return dynamic_cast<const nested_exception*>(&__ex); }
};
template<typename _Ex>
struct __get_nested_helper<_Ex*>
{
static const nested_exception*
_S_get(const _Ex* __ex)
{ return dynamic_cast<const nested_exception*>(__ex); }
};
template<typename _Ex>
inline const nested_exception*
__get_nested_exception(const _Ex& __ex)
{ return __get_nested_helper<_Ex>::_S_get(__ex); }
template<typename _Ex>
void
__throw_with_nested(_Ex&&, const nested_exception* = 0)
__attribute__ ((__noreturn__));
template<typename _Ex>
void
__throw_with_nested(_Ex&&, ...) __attribute__ ((__noreturn__));
// This function should never be called, but is needed to avoid a warning
// about ambiguous base classes when instantiating throw_with_nested<_Ex>()
// with a type that has an accessible nested_exception base.
template<typename _Ex>
inline void
__throw_with_nested(_Ex&& __ex, const nested_exception*)
{ throw __ex; }
template<typename _Ex>
inline void
__throw_with_nested(_Ex&& __ex, ...)
{ throw _Nested_exception<_Ex>(static_cast<_Ex&&>(__ex)); }
template<typename _Ex>
void
throw_with_nested(_Ex __ex) __attribute__ ((__noreturn__));
/// If @p __ex is derived from nested_exception, @p __ex.
/// Else, an implementation-defined object derived from both.
template<typename _Ex>
inline void
throw_with_nested(_Ex __ex)
{
if (__get_nested_exception(__ex))
throw __ex;
__throw_with_nested(static_cast<_Ex&&>(__ex), &__ex);
}
/// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested().
template<typename _Ex>
inline void
rethrow_if_nested(const _Ex& __ex)
{
if (const nested_exception* __nested = __get_nested_exception(__ex))
__nested->rethrow_nested();
}
/// Overload, See N2619
inline void
rethrow_if_nested(const nested_exception& __ex)
{ __ex.rethrow_nested(); }
// @} group exceptions
} // namespace std
} // extern "C++"
#endif // C++11
# 163 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
#pragma GCC visibility pop
#endif // _GLIBCXX_NESTED_EXCEPTION_H
# 167 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/nested_exception.h" 3
# 164 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 2 3
#endif
# 165 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
#endif
# 167 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/exception" 3
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 2 3
#pragma GCC visibility push(default)
extern "C++" {
namespace std
{
/**
* @brief Exception possibly thrown by @c new.
* @ingroup exceptions
*
* @c bad_alloc (or classes derived from it) is used to report allocation
* errors from the throwing forms of @c new. */
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_alloc() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};
#if __cplusplus >= 201103L
class bad_array_new_length : public bad_alloc
{
public:
bad_array_new_length() throw() { };
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_array_new_length() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};
#endif
# 81 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
// We throw this exception for GNU VLAs of negative length in all C++
// dialects, so declare it if we aren't in strict conformance mode.
#if __cplusplus > 201103L || !defined(__STRICT_ANSI__)
class bad_array_length : public bad_alloc
{
public:
bad_array_length() throw() { };
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_array_length() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};
#endif
# 98 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
struct nothrow_t { };
extern const nothrow_t nothrow;
/** If you write your own error handler to be called by @c new, it must
* be of this type. */
typedef void (*new_handler)();
/// Takes a replacement handler as the argument, returns the
/// previous handler.
new_handler set_new_handler(new_handler) throw();
#if __cplusplus >= 201103L
/// Return the current new handler.
new_handler get_new_handler() noexcept;
#endif
# 115 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
} // namespace std
//@{
/** These are replaceable signatures:
* - normal single new and delete (no arguments, throw @c bad_alloc on error)
* - normal array new and delete (same)
* - @c nothrow single new and delete (take a @c nothrow argument, return
* @c NULL on error)
* - @c nothrow array new and delete (same)
*
* Placement new and delete signatures (take a memory address argument,
* does nothing) may not be replaced by a user's program.
*/
void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
__attribute__((__externally_visible__));
void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
__attribute__((__externally_visible__));
void operator delete(void*) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
// Default placement versions of operator new.
inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
{ return __p; }
inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
{ return __p; }
// Default placement versions of operator delete.
inline void operator delete (void*, void*) _GLIBCXX_USE_NOEXCEPT { }
inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { }
//@}
} // extern "C++"
#pragma GCC visibility pop
#endif
# 162 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/new" 3
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/functexcept.h>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
#endif
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
using std::size_t;
using std::ptrdiff_t;
/**
* @brief An allocator that uses global new, as per [20.4].
* @ingroup allocators
*
* This is precisely the allocator defined in the C++ Standard.
* - all allocation calls operator new
* - all deallocation calls operator delete
*
* @tparam _Tp Type of allocated object.
*/
template<typename _Tp>
class new_allocator
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
template<typename _Tp1>
struct rebind
{ typedef new_allocator<_Tp1> other; };
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2103. propagate_on_container_move_assignment
typedef std::true_type propagate_on_container_move_assignment;
#endif
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
new_allocator() _GLIBCXX_USE_NOEXCEPT { }
new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { }
template<typename _Tp1>
new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
~new_allocator() _GLIBCXX_USE_NOEXCEPT { }
pointer
address(reference __x) const _GLIBCXX_NOEXCEPT
{ return std::__addressof(__x); }
const_pointer
address(const_reference __x) const _GLIBCXX_NOEXCEPT
{ return std::__addressof(__x); }
// NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0.
pointer
allocate(size_type __n, const void* = 0)
{
if (__n > this->max_size())
std::__throw_bad_alloc();
return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
}
#ifdef __GXX_DELETE_WITH_SIZE__
// __p is not permitted to be a null pointer.
void
deallocate(pointer __p, size_type __t)
{ ::operator delete(__p, __t * sizeof(_Tp)); }
#else
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
// __p is not permitted to be a null pointer.
void
deallocate(pointer __p, size_type)
{ ::operator delete(__p); }
#endif
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
size_type
max_size() const _GLIBCXX_USE_NOEXCEPT
{ return size_t(-1) / sizeof(_Tp); }
#if __cplusplus >= 201103L
template<typename _Up, typename... _Args>
void
construct(_Up* __p, _Args&&... __args)
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
template<typename _Up>
void
destroy(_Up* __p) { __p->~_Up(); }
#else
# 133 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
{ ::new((void *)__p) _Tp(__val); }
void
destroy(pointer __p) { __p->~_Tp(); }
#endif
# 142 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
};
template<typename _Tp>
inline bool
operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return true; }
template<typename _Tp>
inline bool
operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
{ return false; }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 158 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/new_allocator.h" 3
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++allocator.h" 2 3
#if __cplusplus >= 201103L
namespace std
{
/**
* @brief An alias to the base class for std::allocator.
* @ingroup allocators
*
* Used to set the std::allocator base class to
* __gnu_cxx::new_allocator.
*
* @tparam _Tp Type of allocated object.
*/
template<typename _Tp>
using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
}
#else
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++allocator.h" 3
// Define new_allocator as the base class to std::allocator.
# define __allocator_base __gnu_cxx::new_allocator
#endif
# 54 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++allocator.h" 3
#endif
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/c++allocator.h" 3
# 47 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/memoryfwd.h>
#endif /* expanded by -frewrite-includes */
# 47 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/memoryfwd.h" 1 3
// <memory> Forward declarations -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
* Copyright (c) 1996-1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/memoryfwd.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _MEMORYFWD_H
#define _MEMORYFWD_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 47 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/memoryfwd.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/memoryfwd.h" 3
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/memoryfwd.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup allocators Allocators
* @ingroup memory
*
* Classes encapsulating memory operations.
*
* @{
*/
template<typename>
class allocator;
template<>
class allocator<void>;
/// Declare uses_allocator so it can be specialized in \<queue\> etc.
template<typename, typename>
struct uses_allocator;
/// @} group memory
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/memoryfwd.h" 3
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 2 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @addtogroup allocators
* @{
*/
/// allocator<void> specialization.
template<>
class allocator<void>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2103. std::allocator propagate_on_container_move_assignment
typedef true_type propagate_on_container_move_assignment;
#endif
# 81 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
};
/**
* @brief The @a standard allocator, as per [20.4].
*
* See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html
* for further details.
*
* @tparam _Tp Type of allocated object.
*/
template<typename _Tp>
class allocator: public __allocator_base<_Tp>
{
public:
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
typedef _Tp value_type;
template<typename _Tp1>
struct rebind
{ typedef allocator<_Tp1> other; };
#if __cplusplus >= 201103L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2103. std::allocator propagate_on_container_move_assignment
typedef true_type propagate_on_container_move_assignment;
#endif
# 112 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
allocator() throw() { }
allocator(const allocator& __a) throw()
: __allocator_base<_Tp>(__a) { }
template<typename _Tp1>
allocator(const allocator<_Tp1>&) throw() { }
~allocator() throw() { }
// Inherit everything else.
};
template<typename _T1, typename _T2>
inline bool
operator==(const allocator<_T1>&, const allocator<_T2>&)
{ return true; }
template<typename _Tp>
inline bool
operator==(const allocator<_Tp>&, const allocator<_Tp>&)
{ return true; }
template<typename _T1, typename _T2>
inline bool
operator!=(const allocator<_T1>&, const allocator<_T2>&)
{ return false; }
template<typename _Tp>
inline bool
operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
{ return false; }
/// @} group allocator
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
#if _GLIBCXX_EXTERN_TEMPLATE
extern template class allocator<char>;
extern template class allocator<wchar_t>;
#endif
# 154 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
// Undefine.
#undef __allocator_base
// To implement Option 3 of DR 431.
template<typename _Alloc, bool = __is_empty(_Alloc)>
struct __alloc_swap
{ static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } };
template<typename _Alloc>
struct __alloc_swap<_Alloc, false>
{
static void
_S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT
{
// Precondition: swappable allocators.
if (__one != __two)
swap(__one, __two);
}
};
// Optimize for stateless allocators.
template<typename _Alloc, bool = __is_empty(_Alloc)>
struct __alloc_neq
{
static bool
_S_do_it(const _Alloc&, const _Alloc&)
{ return false; }
};
template<typename _Alloc>
struct __alloc_neq<_Alloc, false>
{
static bool
_S_do_it(const _Alloc& __one, const _Alloc& __two)
{ return __one != __two; }
};
#if __cplusplus >= 201103L
template<typename _Tp, bool
= __or_<is_copy_constructible<typename _Tp::value_type>,
is_nothrow_move_constructible<typename _Tp::value_type>>::value>
struct __shrink_to_fit_aux
{ static bool _S_do_it(_Tp&) noexcept { return false; } };
template<typename _Tp>
struct __shrink_to_fit_aux<_Tp, true>
{
static bool
_S_do_it(_Tp& __c) noexcept
{
__try
{
_Tp(__make_move_if_noexcept_iterator(__c.begin()),
__make_move_if_noexcept_iterator(__c.end()),
__c.get_allocator()).swap(__c);
return true;
}
__catch(...)
{ return false; }
}
};
#endif
# 217 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
# 222 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/allocator.h" 3
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_construct.h>
#endif /* expanded by -frewrite-includes */
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 1 3
// nonstandard construct and destroy functions -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_construct.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _STL_CONSTRUCT_H
#define _STL_CONSTRUCT_H 1
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h>
#endif /* expanded by -frewrite-includes */
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/alloc_traits.h>
#endif /* expanded by -frewrite-includes */
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 1 3
// Allocator traits -*- C++ -*-
// Copyright (C) 2011-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/alloc_traits.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _EXT_ALLOC_TRAITS_H
#define _EXT_ALLOC_TRAITS_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
# include <bits/move.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/alloc_traits.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 1 3
// Allocator traits -*- C++ -*-
// Copyright (C) 2011-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/alloc_traits.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _ALLOC_TRAITS_H
#define _ALLOC_TRAITS_H 1
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <bits/memoryfwd.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/ptr_traits.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/numeric_traits.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc, typename _Tp>
class __alloctr_rebind_helper
{
template<typename _Alloc2, typename _Tp2>
static constexpr true_type
_S_chk(typename _Alloc2::template rebind<_Tp2>::other*);
template<typename, typename>
static constexpr false_type
_S_chk(...);
public:
using __type = decltype(_S_chk<_Alloc, _Tp>(nullptr));
};
template<typename _Alloc, typename _Tp,
bool = __alloctr_rebind_helper<_Alloc, _Tp>::__type::value>
struct __alloctr_rebind;
template<typename _Alloc, typename _Tp>
struct __alloctr_rebind<_Alloc, _Tp, true>
{
typedef typename _Alloc::template rebind<_Tp>::other __type;
};
template<template<typename, typename...> class _Alloc, typename _Tp,
typename _Up, typename... _Args>
struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false>
{
typedef _Alloc<_Tp, _Args...> __type;
};
/**
* @brief Uniform interface to all allocator types.
* @ingroup allocators
*/
template<typename _Alloc>
struct allocator_traits
{
/// The allocator type
typedef _Alloc allocator_type;
/// The allocated type
typedef typename _Alloc::value_type value_type;
#define _GLIBCXX_ALLOC_TR_NESTED_TYPE(_NTYPE, _ALT) \
private: \
template<typename _Tp> \
static typename _Tp::_NTYPE _S_##_NTYPE##_helper(_Tp*); \
static _ALT _S_##_NTYPE##_helper(...); \
typedef decltype(_S_##_NTYPE##_helper((_Alloc*)0)) __##_NTYPE; \
public:
_GLIBCXX_ALLOC_TR_NESTED_TYPE(pointer, value_type*)
/**
* @brief The allocator's pointer type.
*
* @c Alloc::pointer if that type exists, otherwise @c value_type*
*/
typedef __pointer pointer;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(const_pointer,
typename pointer_traits<pointer>::template rebind<const value_type>)
/**
* @brief The allocator's const pointer type.
*
* @c Alloc::const_pointer if that type exists, otherwise
* <tt> pointer_traits<pointer>::rebind<const value_type> </tt>
*/
typedef __const_pointer const_pointer;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(void_pointer,
typename pointer_traits<pointer>::template rebind<void>)
/**
* @brief The allocator's void pointer type.
*
* @c Alloc::void_pointer if that type exists, otherwise
* <tt> pointer_traits<pointer>::rebind<void> </tt>
*/
typedef __void_pointer void_pointer;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(const_void_pointer,
typename pointer_traits<pointer>::template rebind<const void>)
/**
* @brief The allocator's const void pointer type.
*
* @c Alloc::const_void_pointer if that type exists, otherwise
* <tt> pointer_traits<pointer>::rebind<const void> </tt>
*/
typedef __const_void_pointer const_void_pointer;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(difference_type,
typename pointer_traits<pointer>::difference_type)
/**
* @brief The allocator's difference type
*
* @c Alloc::difference_type if that type exists, otherwise
* <tt> pointer_traits<pointer>::difference_type </tt>
*/
typedef __difference_type difference_type;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(size_type,
typename make_unsigned<difference_type>::type)
/**
* @brief The allocator's size type
*
* @c Alloc::size_type if that type exists, otherwise
* <tt> make_unsigned<difference_type>::type </tt>
*/
typedef __size_type size_type;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_copy_assignment,
false_type)
/**
* @brief How the allocator is propagated on copy assignment
*
* @c Alloc::propagate_on_container_copy_assignment if that type exists,
* otherwise @c false_type
*/
typedef __propagate_on_container_copy_assignment
propagate_on_container_copy_assignment;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_move_assignment,
false_type)
/**
* @brief How the allocator is propagated on move assignment
*
* @c Alloc::propagate_on_container_move_assignment if that type exists,
* otherwise @c false_type
*/
typedef __propagate_on_container_move_assignment
propagate_on_container_move_assignment;
_GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
false_type)
/**
* @brief How the allocator is propagated on swap
*
* @c Alloc::propagate_on_container_swap if that type exists,
* otherwise @c false_type
*/
typedef __propagate_on_container_swap propagate_on_container_swap;
#undef _GLIBCXX_ALLOC_TR_NESTED_TYPE
template<typename _Tp>
using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
template<typename _Tp>
using rebind_traits = allocator_traits<rebind_alloc<_Tp>>;
private:
template<typename _Alloc2>
struct __allocate_helper
{
template<typename _Alloc3,
typename = decltype(std::declval<_Alloc3*>()->allocate(
std::declval<size_type>(),
std::declval<const_void_pointer>()))>
static true_type __test(int);
template<typename>
static false_type __test(...);
using type = decltype(__test<_Alloc>(0));
};
template<typename _Alloc2>
static typename
enable_if<__allocate_helper<_Alloc2>::type::value, pointer>::type
_S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint)
{ return __a.allocate(__n, __hint); }
template<typename _Alloc2, typename _UnusedHint>
static typename
enable_if<!__allocate_helper<_Alloc2>::type::value, pointer>::type
_S_allocate(_Alloc2& __a, size_type __n, _UnusedHint)
{ return __a.allocate(__n); }
template<typename _Tp, typename... _Args>
struct __construct_helper
{
template<typename _Alloc2,
typename = decltype(std::declval<_Alloc2*>()->construct(
std::declval<_Tp*>(), std::declval<_Args>()...))>
static true_type __test(int);
template<typename>
static false_type __test(...);
using type = decltype(__test<_Alloc>(0));
};
template<typename _Tp, typename... _Args>
static typename
enable_if<__construct_helper<_Tp, _Args...>::type::value>::type
_S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
{ __a.construct(__p, std::forward<_Args>(__args)...); }
template<typename _Tp, typename... _Args>
static typename
enable_if<!__construct_helper<_Tp, _Args...>::type::value &&
is_constructible<_Tp, _Args...>::value>::type
_S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
{ ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
template<typename _Tp>
struct __destroy_helper
{
template<typename _Alloc2,
typename = decltype(std::declval<_Alloc2*>()->destroy(
std::declval<_Tp*>()))>
static true_type __test(int);
template<typename>
static false_type __test(...);
using type = decltype(__test<_Alloc>(0));
};
template<typename _Tp>
static typename
enable_if<__destroy_helper<_Tp>::type::value>::type
_S_destroy(_Alloc& __a, _Tp* __p)
{ __a.destroy(__p); }
template<typename _Tp>
static typename
enable_if<!__destroy_helper<_Tp>::type::value>::type
_S_destroy(_Alloc&, _Tp* __p)
{ __p->~_Tp(); }
template<typename _Alloc2>
struct __maxsize_helper
{
template<typename _Alloc3,
typename = decltype(std::declval<_Alloc3*>()->max_size())>
static true_type __test(int);
template<typename>
static false_type __test(...);
using type = decltype(__test<_Alloc2>(0));
};
template<typename _Alloc2>
static typename
enable_if<__maxsize_helper<_Alloc2>::type::value, size_type>::type
_S_max_size(_Alloc2& __a, int)
{ return __a.max_size(); }
template<typename _Alloc2>
static typename
enable_if<!__maxsize_helper<_Alloc2>::type::value, size_type>::type
_S_max_size(_Alloc2&, ...)
{ return __gnu_cxx::__numeric_traits<size_type>::__max; }
template<typename _Alloc2>
struct __select_helper
{
template<typename _Alloc3, typename
= decltype(std::declval<_Alloc3*>()
->select_on_container_copy_construction())>
static true_type __test(int);
template<typename>
static false_type __test(...);
using type = decltype(__test<_Alloc2>(0));
};
template<typename _Alloc2>
static typename
enable_if<__select_helper<_Alloc2>::type::value, _Alloc2>::type
_S_select(_Alloc2& __a, int)
{ return __a.select_on_container_copy_construction(); }
template<typename _Alloc2>
static typename
enable_if<!__select_helper<_Alloc2>::type::value, _Alloc2>::type
_S_select(_Alloc2& __a, ...)
{ return __a; }
public:
/**
* @brief Allocate memory.
* @param __a An allocator.
* @param __n The number of objects to allocate space for.
*
* Calls @c a.allocate(n)
*/
static pointer
allocate(_Alloc& __a, size_type __n)
{ return __a.allocate(__n); }
/**
* @brief Allocate memory.
* @param __a An allocator.
* @param __n The number of objects to allocate space for.
* @param __hint Aid to locality.
* @return Memory of suitable size and alignment for @a n objects
* of type @c value_type
*
* Returns <tt> a.allocate(n, hint) </tt> if that expression is
* well-formed, otherwise returns @c a.allocate(n)
*/
static pointer
allocate(_Alloc& __a, size_type __n, const_void_pointer __hint)
{ return _S_allocate(__a, __n, __hint); }
/**
* @brief Deallocate memory.
* @param __a An allocator.
* @param __p Pointer to the memory to deallocate.
* @param __n The number of objects space was allocated for.
*
* Calls <tt> a.deallocate(p, n) </tt>
*/
static void deallocate(_Alloc& __a, pointer __p, size_type __n)
{ __a.deallocate(__p, __n); }
/**
* @brief Construct an object of type @a _Tp
* @param __a An allocator.
* @param __p Pointer to memory of suitable size and alignment for Tp
* @param __args Constructor arguments.
*
* Calls <tt> __a.construct(__p, std::forward<Args>(__args)...) </tt>
* if that expression is well-formed, otherwise uses placement-new
* to construct an object of type @a _Tp at location @a __p from the
* arguments @a __args...
*/
template<typename _Tp, typename... _Args>
static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
-> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
/**
* @brief Destroy an object of type @a _Tp
* @param __a An allocator.
* @param __p Pointer to the object to destroy
*
* Calls @c __a.destroy(__p) if that expression is well-formed,
* otherwise calls @c __p->~_Tp()
*/
template<typename _Tp>
static void destroy(_Alloc& __a, _Tp* __p)
{ _S_destroy(__a, __p); }
/**
* @brief The maximum supported allocation size
* @param __a An allocator.
* @return @c __a.max_size() or @c numeric_limits<size_type>::max()
*
* Returns @c __a.max_size() if that expression is well-formed,
* otherwise returns @c numeric_limits<size_type>::max()
*/
static size_type max_size(const _Alloc& __a) noexcept
{ return _S_max_size(__a, 0); }
/**
* @brief Obtain an allocator to use when copying a container.
* @param __rhs An allocator.
* @return @c __rhs.select_on_container_copy_construction() or @a __rhs
*
* Returns @c __rhs.select_on_container_copy_construction() if that
* expression is well-formed, otherwise returns @a __rhs
*/
static _Alloc
select_on_container_copy_construction(const _Alloc& __rhs)
{ return _S_select(__rhs, 0); }
};
/// Partial specialization for std::allocator.
template<typename _Tp>
struct allocator_traits<allocator<_Tp>>
{
/// The allocator type
using allocator_type = allocator<_Tp>;
/// The allocated type
using value_type = _Tp;
/// The allocator's pointer type.
using pointer = _Tp*;
/// The allocator's const pointer type.
using const_pointer = const _Tp*;
/// The allocator's void pointer type.
using void_pointer = void*;
/// The allocator's const void pointer type.
using const_void_pointer = const void*;
/// The allocator's difference type
using difference_type = std::ptrdiff_t;
/// The allocator's size type
using size_type = std::size_t;
/// How the allocator is propagated on copy assignment
using propagate_on_container_copy_assignment = false_type;
/// How the allocator is propagated on move assignment
using propagate_on_container_move_assignment = true_type;
/// How the allocator is propagated on swap
using propagate_on_container_swap = false_type;
// NOTE(ott): the following causes ICE on GCC 4.9, use the
// generic form instead.
// template<typename _Up>
// using rebind_alloc = allocator<_Up>;
// template<typename _Up>
// using rebind_traits = allocator_traits<allocator<_Up>>;
template<typename _Tp1>
using rebind_alloc = typename allocator_type::template rebind<_Tp1>::other;
template<typename _Tp1>
using rebind_traits = allocator_traits<rebind_alloc<_Tp1>>;
/**
* @brief Allocate memory.
* @param __a An allocator.
* @param __n The number of objects to allocate space for.
*
* Calls @c a.allocate(n)
*/
static pointer
allocate(allocator_type& __a, size_type __n)
{ return __a.allocate(__n); }
/**
* @brief Allocate memory.
* @param __a An allocator.
* @param __n The number of objects to allocate space for.
* @param __hint Aid to locality.
* @return Memory of suitable size and alignment for @a n objects
* of type @c value_type
*
* Returns <tt> a.allocate(n, hint) </tt>
*/
static pointer
allocate(allocator_type& __a, size_type __n, const_void_pointer __hint)
{ return __a.allocate(__n, __hint); }
/**
* @brief Deallocate memory.
* @param __a An allocator.
* @param __p Pointer to the memory to deallocate.
* @param __n The number of objects space was allocated for.
*
* Calls <tt> a.deallocate(p, n) </tt>
*/
static void
deallocate(allocator_type& __a, pointer __p, size_type __n)
{ __a.deallocate(__p, __n); }
/**
* @brief Construct an object of type @a _Up
* @param __a An allocator.
* @param __p Pointer to memory of suitable size and alignment for Tp
* @param __args Constructor arguments.
*
* Calls <tt> __a.construct(__p, std::forward<Args>(__args)...) </tt>
*/
template<typename _Up, typename... _Args>
static void
construct(allocator_type& __a, _Up* __p, _Args&&... __args)
{ __a.construct(__p, std::forward<_Args>(__args)...); }
/**
* @brief Destroy an object of type @a _Up
* @param __a An allocator.
* @param __p Pointer to the object to destroy
*
* Calls @c __a.destroy(__p).
*/
template<typename _Up>
static void
destroy(allocator_type& __a, _Up* __p)
{ __a.destroy(__p); }
/**
* @brief The maximum supported allocation size
* @param __a An allocator.
* @return @c __a.max_size()
*/
static size_type
max_size(const allocator_type& __a) noexcept
{ return __a.max_size(); }
/**
* @brief Obtain an allocator to use when copying a container.
* @param __rhs An allocator.
* @return @c __rhs
*/
static allocator_type
select_on_container_copy_construction(const allocator_type& __rhs)
{ return __rhs; }
};
template<typename _Alloc>
inline void
__do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type)
{ __one = __two; }
template<typename _Alloc>
inline void
__do_alloc_on_copy(_Alloc&, const _Alloc&, false_type)
{ }
template<typename _Alloc>
inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two)
{
typedef allocator_traits<_Alloc> __traits;
typedef typename __traits::propagate_on_container_copy_assignment __pocca;
__do_alloc_on_copy(__one, __two, __pocca());
}
template<typename _Alloc>
inline _Alloc __alloc_on_copy(const _Alloc& __a)
{
typedef allocator_traits<_Alloc> __traits;
return __traits::select_on_container_copy_construction(__a);
}
template<typename _Alloc>
inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type)
{ __one = std::move(__two); }
template<typename _Alloc>
inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type)
{ }
template<typename _Alloc>
inline void __alloc_on_move(_Alloc& __one, _Alloc& __two)
{
typedef allocator_traits<_Alloc> __traits;
typedef typename __traits::propagate_on_container_move_assignment __pocma;
__do_alloc_on_move(__one, __two, __pocma());
}
template<typename _Alloc>
inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type)
{
using std::swap;
swap(__one, __two);
}
template<typename _Alloc>
inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type)
{ }
template<typename _Alloc>
inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two)
{
typedef allocator_traits<_Alloc> __traits;
typedef typename __traits::propagate_on_container_swap __pocs;
__do_alloc_on_swap(__one, __two, __pocs());
}
template<typename _Alloc>
class __is_copy_insertable_impl
{
typedef allocator_traits<_Alloc> _Traits;
template<typename _Up, typename
= decltype(_Traits::construct(std::declval<_Alloc&>(),
std::declval<_Up*>(),
std::declval<const _Up&>()))>
static true_type
_M_select(int);
template<typename _Up>
static false_type
_M_select(...);
public:
typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
};
// true if _Alloc::value_type is CopyInsertable into containers using _Alloc
template<typename _Alloc>
struct __is_copy_insertable
: __is_copy_insertable_impl<_Alloc>::type
{ };
// std::allocator<_Tp> just requires CopyConstructible
template<typename _Tp>
struct __is_copy_insertable<allocator<_Tp>>
: is_copy_constructible<_Tp>
{ };
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
# 649 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
#endif
# 650 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/alloc_traits.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 2 3
#else
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/allocator.h> // for __alloc_swap
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
#endif
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
template<typename _Alloc>
struct __allocator_always_compares_equal : std::false_type { };
template<typename _Tp>
struct __allocator_always_compares_equal<std::allocator<_Tp>>
: std::true_type { };
template<typename, typename> struct array_allocator;
template<typename _Tp, typename _Array>
struct __allocator_always_compares_equal<array_allocator<_Tp, _Array>>
: std::true_type { };
template<typename> struct bitmap_allocator;
template<typename _Tp>
struct __allocator_always_compares_equal<bitmap_allocator<_Tp>>
: std::true_type { };
template<typename> struct malloc_allocator;
template<typename _Tp>
struct __allocator_always_compares_equal<malloc_allocator<_Tp>>
: std::true_type { };
template<typename> struct mt_allocator;
template<typename _Tp>
struct __allocator_always_compares_equal<mt_allocator<_Tp>>
: std::true_type { };
template<typename> struct new_allocator;
template<typename _Tp>
struct __allocator_always_compares_equal<new_allocator<_Tp>>
: std::true_type { };
template<typename> struct pool_allocator;
template<typename _Tp>
struct __allocator_always_compares_equal<pool_allocator<_Tp>>
: std::true_type { };
#endif
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
/**
* @brief Uniform interface to C++98 and C++0x allocators.
* @ingroup allocators
*/
template<typename _Alloc>
struct __alloc_traits
#if __cplusplus >= 201103L
: std::allocator_traits<_Alloc>
#endif
# 99 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
{
typedef _Alloc allocator_type;
#if __cplusplus >= 201103L
typedef std::allocator_traits<_Alloc> _Base_type;
typedef typename _Base_type::value_type value_type;
typedef typename _Base_type::pointer pointer;
typedef typename _Base_type::const_pointer const_pointer;
typedef typename _Base_type::size_type size_type;
typedef typename _Base_type::difference_type difference_type;
// C++11 allocators do not define reference or const_reference
typedef value_type& reference;
typedef const value_type& const_reference;
using _Base_type::allocate;
using _Base_type::deallocate;
using _Base_type::construct;
using _Base_type::destroy;
using _Base_type::max_size;
private:
template<typename _Ptr>
using __is_custom_pointer
= std::__and_<std::is_same<pointer, _Ptr>,
std::__not_<std::is_pointer<_Ptr>>>;
public:
// overload construct for non-standard pointer types
template<typename _Ptr, typename... _Args>
static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type
construct(_Alloc& __a, _Ptr __p, _Args&&... __args)
{
_Base_type::construct(__a, std::addressof(*__p),
std::forward<_Args>(__args)...);
}
// overload destroy for non-standard pointer types
template<typename _Ptr>
static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type
destroy(_Alloc& __a, _Ptr __p)
{ _Base_type::destroy(__a, std::addressof(*__p)); }
static _Alloc _S_select_on_copy(const _Alloc& __a)
{ return _Base_type::select_on_container_copy_construction(__a); }
static void _S_on_swap(_Alloc& __a, _Alloc& __b)
{ std::__alloc_on_swap(__a, __b); }
static constexpr bool _S_propagate_on_copy_assign()
{ return _Base_type::propagate_on_container_copy_assignment::value; }
static constexpr bool _S_propagate_on_move_assign()
{ return _Base_type::propagate_on_container_move_assignment::value; }
static constexpr bool _S_propagate_on_swap()
{ return _Base_type::propagate_on_container_swap::value; }
static constexpr bool _S_always_equal()
{ return __allocator_always_compares_equal<_Alloc>::value; }
static constexpr bool _S_nothrow_move()
{ return _S_propagate_on_move_assign() || _S_always_equal(); }
static constexpr bool _S_nothrow_swap()
{
using std::swap;
return !_S_propagate_on_swap()
|| noexcept(swap(std::declval<_Alloc&>(), std::declval<_Alloc&>()));
}
template<typename _Tp>
struct rebind
{ typedef typename _Base_type::template rebind_alloc<_Tp> other; };
#else
# 171 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
typedef typename _Alloc::pointer pointer;
typedef typename _Alloc::const_pointer const_pointer;
typedef typename _Alloc::value_type value_type;
typedef typename _Alloc::reference reference;
typedef typename _Alloc::const_reference const_reference;
typedef typename _Alloc::size_type size_type;
typedef typename _Alloc::difference_type difference_type;
static pointer
allocate(_Alloc& __a, size_type __n)
{ return __a.allocate(__n); }
static void deallocate(_Alloc& __a, pointer __p, size_type __n)
{ __a.deallocate(__p, __n); }
template<typename _Tp>
static void construct(_Alloc& __a, pointer __p, const _Tp& __arg)
{ __a.construct(__p, __arg); }
static void destroy(_Alloc& __a, pointer __p)
{ __a.destroy(__p); }
static size_type max_size(const _Alloc& __a)
{ return __a.max_size(); }
static const _Alloc& _S_select_on_copy(const _Alloc& __a) { return __a; }
static void _S_on_swap(_Alloc& __a, _Alloc& __b)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 431. Swapping containers with unequal allocators.
std::__alloc_swap<_Alloc>::_S_do_it(__a, __b);
}
template<typename _Tp>
struct rebind
{ typedef typename _Alloc::template rebind<_Tp>::other other; };
#endif
# 210 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
# 216 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/alloc_traits.h" 3
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* Constructs an object in existing memory by invoking an allocated
* object's constructor with an initializer.
*/
#if __cplusplus >= 201103L
template<typename _T1, typename... _Args>
inline void
_Construct(_T1* __p, _Args&&... __args)
{ ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
#else
# 77 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
template<typename _T1, typename _T2>
inline void
_Construct(_T1* __p, const _T2& __value)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 402. wrong new expression in [some_]allocator::construct
::new(static_cast<void*>(__p)) _T1(__value);
}
#endif
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
/**
* Destroy the object pointed to by a pointer type.
*/
template<typename _Tp>
inline void
_Destroy(_Tp* __pointer)
{ __pointer->~_Tp(); }
template<bool>
struct _Destroy_aux
{
template<typename _ForwardIterator>
static void
__destroy(_ForwardIterator __first, _ForwardIterator __last)
{
for (; __first != __last; ++__first)
std::_Destroy(std::__addressof(*__first));
}
};
template<>
struct _Destroy_aux<true>
{
template<typename _ForwardIterator>
static void
__destroy(_ForwardIterator, _ForwardIterator) { }
};
/**
* Destroy a range of objects. If the value_type of the object has
* a trivial destructor, the compiler should optimize all of this
* away, otherwise the objects' destructors must be invoked.
*/
template<typename _ForwardIterator>
inline void
_Destroy(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_Value_type;
std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
__destroy(__first, __last);
}
/**
* Destroy a range of objects using the supplied allocator. For
* nondefault allocators we do not optimize away invocation of
* destroy() even if _Tp has a trivial destructor.
*/
template<typename _ForwardIterator, typename _Allocator>
void
_Destroy(_ForwardIterator __first, _ForwardIterator __last,
_Allocator& __alloc)
{
typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
for (; __first != __last; ++__first)
__traits::destroy(__alloc, std::__addressof(*__first));
}
template<typename _ForwardIterator, typename _Tp>
inline void
_Destroy(_ForwardIterator __first, _ForwardIterator __last,
allocator<_Tp>&)
{
_Destroy(__first, __last);
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif /* _STL_CONSTRUCT_H */
# 158 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_construct.h" 3
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_uninitialized.h>
#endif /* expanded by -frewrite-includes */
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 1 3
// Raw memory manipulators -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_uninitialized.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _STL_UNINITIALIZED_H
#define _STL_UNINITIALIZED_H 1
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<bool _TrivialValueTypes>
struct __uninitialized_copy
{
template<typename _InputIterator, typename _ForwardIterator>
static _ForwardIterator
__uninit_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{
_ForwardIterator __cur = __result;
__try
{
for (; __first != __last; ++__first, ++__cur)
std::_Construct(std::__addressof(*__cur), *__first);
return __cur;
}
__catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_copy<true>
{
template<typename _InputIterator, typename _ForwardIterator>
static _ForwardIterator
__uninit_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{ return std::copy(__first, __last, __result); }
};
/**
* @brief Copies the range [first,last) into result.
* @param __first An input iterator.
* @param __last An input iterator.
* @param __result An output iterator.
* @return __result + (__first - __last)
*
* Like copy(), but does not require an initialized output range.
*/
template<typename _InputIterator, typename _ForwardIterator>
inline _ForwardIterator
uninitialized_copy(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result)
{
typedef typename iterator_traits<_InputIterator>::value_type
_ValueType1;
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType2;
#if __cplusplus < 201103L
const bool __assignable = true;
#else
# 117 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
// trivial types can have deleted assignment
typedef typename iterator_traits<_InputIterator>::reference _RefType1;
typedef typename iterator_traits<_ForwardIterator>::reference _RefType2;
const bool __assignable = is_assignable<_RefType2, _RefType1>::value;
#endif
# 122 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
return std::__uninitialized_copy<__is_trivial(_ValueType1)
&& __is_trivial(_ValueType2)
&& __assignable>::
__uninit_copy(__first, __last, __result);
}
template<bool _TrivialValueType>
struct __uninitialized_fill
{
template<typename _ForwardIterator, typename _Tp>
static void
__uninit_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{
_ForwardIterator __cur = __first;
__try
{
for (; __cur != __last; ++__cur)
std::_Construct(std::__addressof(*__cur), __x);
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_fill<true>
{
template<typename _ForwardIterator, typename _Tp>
static void
__uninit_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{ std::fill(__first, __last, __x); }
};
/**
* @brief Copies the value x into the range [first,last).
* @param __first An input iterator.
* @param __last An input iterator.
* @param __x The source value.
* @return Nothing.
*
* Like fill(), but does not require an initialized output range.
*/
template<typename _ForwardIterator, typename _Tp>
inline void
uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
#if __cplusplus < 201103L
const bool __assignable = true;
#else
# 181 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
// trivial types can have deleted assignment
const bool __assignable = is_copy_assignable<_ValueType>::value;
#endif
# 184 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>::
__uninit_fill(__first, __last, __x);
}
template<bool _TrivialValueType>
struct __uninitialized_fill_n
{
template<typename _ForwardIterator, typename _Size, typename _Tp>
static void
__uninit_fill_n(_ForwardIterator __first, _Size __n,
const _Tp& __x)
{
_ForwardIterator __cur = __first;
__try
{
for (; __n > 0; --__n, ++__cur)
std::_Construct(std::__addressof(*__cur), __x);
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_fill_n<true>
{
template<typename _ForwardIterator, typename _Size, typename _Tp>
static void
__uninit_fill_n(_ForwardIterator __first, _Size __n,
const _Tp& __x)
{ std::fill_n(__first, __n, __x); }
};
/**
* @brief Copies the value x into the range [first,first+n).
* @param __first An input iterator.
* @param __n The number of copies to make.
* @param __x The source value.
* @return Nothing.
*
* Like fill_n(), but does not require an initialized output range.
*/
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline void
uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
#if __cplusplus < 201103L
const bool __assignable = true;
#else
# 240 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
// trivial types can have deleted assignment
const bool __assignable = is_copy_assignable<_ValueType>::value;
#endif
# 243 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
std::__uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>::
__uninit_fill_n(__first, __n, __x);
}
// Extensions: versions of uninitialized_copy, uninitialized_fill,
// and uninitialized_fill_n that take an allocator parameter.
// We dispatch back to the standard versions when we're given the
// default allocator. For nondefault allocators we do not use
// any of the POD optimizations.
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
_ForwardIterator
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _Allocator& __alloc)
{
_ForwardIterator __cur = __result;
__try
{
typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
for (; __first != __last; ++__first, ++__cur)
__traits::construct(__alloc, std::__addressof(*__cur), *__first);
return __cur;
}
__catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
inline _ForwardIterator
__uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, allocator<_Tp>&)
{ return std::uninitialized_copy(__first, __last, __result); }
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
inline _ForwardIterator
__uninitialized_move_a(_InputIterator __first, _InputIterator __last,
_ForwardIterator __result, _Allocator& __alloc)
{
return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
_GLIBCXX_MAKE_MOVE_ITERATOR(__last),
__result, __alloc);
}
template<typename _InputIterator, typename _ForwardIterator,
typename _Allocator>
inline _ForwardIterator
__uninitialized_move_if_noexcept_a(_InputIterator __first,
_InputIterator __last,
_ForwardIterator __result,
_Allocator& __alloc)
{
return std::__uninitialized_copy_a
(_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first),
_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc);
}
template<typename _ForwardIterator, typename _Tp, typename _Allocator>
void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
__try
{
typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
for (; __cur != __last; ++__cur)
__traits::construct(__alloc, std::__addressof(*__cur), __x);
}
__catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Tp, typename _Tp2>
inline void
__uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
const _Tp& __x, allocator<_Tp2>&)
{ std::uninitialized_fill(__first, __last, __x); }
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Allocator>
void
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x, _Allocator& __alloc)
{
_ForwardIterator __cur = __first;
__try
{
typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
for (; __n > 0; --__n, ++__cur)
__traits::construct(__alloc, std::__addressof(*__cur), __x);
}
__catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Size, typename _Tp,
typename _Tp2>
inline void
__uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
const _Tp& __x, allocator<_Tp2>&)
{ std::uninitialized_fill_n(__first, __n, __x); }
// Extensions: __uninitialized_copy_move, __uninitialized_move_copy,
// __uninitialized_fill_move, __uninitialized_move_fill.
// All of these algorithms take a user-supplied allocator, which is used
// for construction and destruction.
// __uninitialized_copy_move
// Copies [first1, last1) into [result, result + (last1 - first1)), and
// move [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)).
template<typename _InputIterator1, typename _InputIterator2,
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
__uninitialized_copy_move(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_ForwardIterator __result,
_Allocator& __alloc)
{
_ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
__result,
__alloc);
__try
{
return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
}
__catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
}
// __uninitialized_move_copy
// Moves [first1, last1) into [result, result + (last1 - first1)), and
// copies [first2, last2) into
// [result, result + (last1 - first1) + (last2 - first2)).
template<typename _InputIterator1, typename _InputIterator2,
typename _ForwardIterator, typename _Allocator>
inline _ForwardIterator
__uninitialized_move_copy(_InputIterator1 __first1,
_InputIterator1 __last1,
_InputIterator2 __first2,
_InputIterator2 __last2,
_ForwardIterator __result,
_Allocator& __alloc)
{
_ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
__result,
__alloc);
__try
{
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
}
__catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
}
// __uninitialized_fill_move
// Fills [result, mid) with x, and moves [first, last) into
// [mid, mid + (last - first)).
template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
typename _Allocator>
inline _ForwardIterator
__uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid,
const _Tp& __x, _InputIterator __first,
_InputIterator __last, _Allocator& __alloc)
{
std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
__try
{
return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
}
__catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
}
// __uninitialized_move_fill
// Moves [first1, last1) into [first2, first2 + (last1 - first1)), and
// fills [first2 + (last1 - first1), last2) with x.
template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
typename _Allocator>
inline void
__uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1,
_ForwardIterator __first2,
_ForwardIterator __last2, const _Tp& __x,
_Allocator& __alloc)
{
_ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
__first2,
__alloc);
__try
{
std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
}
__catch(...)
{
std::_Destroy(__first2, __mid2, __alloc);
__throw_exception_again;
}
}
#if __cplusplus >= 201103L
// Extensions: __uninitialized_default, __uninitialized_default_n,
// __uninitialized_default_a, __uninitialized_default_n_a.
template<bool _TrivialValueType>
struct __uninitialized_default_1
{
template<typename _ForwardIterator>
static void
__uninit_default(_ForwardIterator __first, _ForwardIterator __last)
{
_ForwardIterator __cur = __first;
__try
{
for (; __cur != __last; ++__cur)
std::_Construct(std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_default_1<true>
{
template<typename _ForwardIterator>
static void
__uninit_default(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::fill(__first, __last, _ValueType());
}
};
template<bool _TrivialValueType>
struct __uninitialized_default_n_1
{
template<typename _ForwardIterator, typename _Size>
static void
__uninit_default_n(_ForwardIterator __first, _Size __n)
{
_ForwardIterator __cur = __first;
__try
{
for (; __n > 0; --__n, ++__cur)
std::_Construct(std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_default_n_1<true>
{
template<typename _ForwardIterator, typename _Size>
static void
__uninit_default_n(_ForwardIterator __first, _Size __n)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
std::fill_n(__first, __n, _ValueType());
}
};
// __uninitialized_default
// Fills [first, last) with std::distance(first, last) default
// constructed value_types(s).
template<typename _ForwardIterator>
inline void
__uninitialized_default(_ForwardIterator __first,
_ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// trivial types can have deleted assignment
const bool __assignable = is_copy_assignable<_ValueType>::value;
std::__uninitialized_default_1<__is_trivial(_ValueType)
&& __assignable>::
__uninit_default(__first, __last);
}
// __uninitialized_default_n
// Fills [first, first + n) with n default constructed value_type(s).
template<typename _ForwardIterator, typename _Size>
inline void
__uninitialized_default_n(_ForwardIterator __first, _Size __n)
{
typedef typename iterator_traits<_ForwardIterator>::value_type
_ValueType;
// trivial types can have deleted assignment
const bool __assignable = is_copy_assignable<_ValueType>::value;
std::__uninitialized_default_n_1<__is_trivial(_ValueType)
&& __assignable>::
__uninit_default_n(__first, __n);
}
// __uninitialized_default_a
// Fills [first, last) with std::distance(first, last) default
// constructed value_types(s), constructed with the allocator alloc.
template<typename _ForwardIterator, typename _Allocator>
void
__uninitialized_default_a(_ForwardIterator __first,
_ForwardIterator __last,
_Allocator& __alloc)
{
_ForwardIterator __cur = __first;
__try
{
typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
for (; __cur != __last; ++__cur)
__traits::construct(__alloc, std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Tp>
inline void
__uninitialized_default_a(_ForwardIterator __first,
_ForwardIterator __last,
allocator<_Tp>&)
{ std::__uninitialized_default(__first, __last); }
// __uninitialized_default_n_a
// Fills [first, first + n) with n default constructed value_types(s),
// constructed with the allocator alloc.
template<typename _ForwardIterator, typename _Size, typename _Allocator>
void
__uninitialized_default_n_a(_ForwardIterator __first, _Size __n,
_Allocator& __alloc)
{
_ForwardIterator __cur = __first;
__try
{
typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
for (; __n > 0; --__n, ++__cur)
__traits::construct(__alloc, std::__addressof(*__cur));
}
__catch(...)
{
std::_Destroy(__first, __cur, __alloc);
__throw_exception_again;
}
}
template<typename _ForwardIterator, typename _Size, typename _Tp>
inline void
__uninitialized_default_n_a(_ForwardIterator __first, _Size __n,
allocator<_Tp>&)
{ std::__uninitialized_default_n(__first, __n); }
template<typename _InputIterator, typename _Size,
typename _ForwardIterator>
_ForwardIterator
__uninitialized_copy_n(_InputIterator __first, _Size __n,
_ForwardIterator __result, input_iterator_tag)
{
_ForwardIterator __cur = __result;
__try
{
for (; __n > 0; --__n, ++__first, ++__cur)
std::_Construct(std::__addressof(*__cur), *__first);
return __cur;
}
__catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
}
template<typename _RandomAccessIterator, typename _Size,
typename _ForwardIterator>
inline _ForwardIterator
__uninitialized_copy_n(_RandomAccessIterator __first, _Size __n,
_ForwardIterator __result,
random_access_iterator_tag)
{ return std::uninitialized_copy(__first, __first + __n, __result); }
/**
* @brief Copies the range [first,first+n) into result.
* @param __first An input iterator.
* @param __n The number of elements to copy.
* @param __result An output iterator.
* @return __result + __n
*
* Like copy_n(), but does not require an initialized output range.
*/
template<typename _InputIterator, typename _Size, typename _ForwardIterator>
inline _ForwardIterator
uninitialized_copy_n(_InputIterator __first, _Size __n,
_ForwardIterator __result)
{ return std::__uninitialized_copy_n(__first, __n, __result,
std::__iterator_category(__first)); }
#endif
# 679 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _STL_UNINITIALIZED_H */
# 684 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_uninitialized.h" 3
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_tempbuf.h>
#endif /* expanded by -frewrite-includes */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_tempbuf.h" 1 3
// Temporary buffer implementation -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_tempbuf.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _STL_TEMPBUF_H
#define _STL_TEMPBUF_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_algobase.h>
#endif /* expanded by -frewrite-includes */
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_tempbuf.h" 3
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_tempbuf.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_construct.h>
#endif /* expanded by -frewrite-includes */
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_tempbuf.h" 3
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_tempbuf.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @brief Allocates a temporary buffer.
* @param __len The number of objects of type Tp.
* @return See full description.
*
* Reinventing the wheel, but this time with prettier spokes!
*
* This function tries to obtain storage for @c __len adjacent Tp
* objects. The objects themselves are not constructed, of course.
* A pair<> is returned containing <em>the buffer s address and
* capacity (in the units of sizeof(_Tp)), or a pair of 0 values if
* no storage can be obtained.</em> Note that the capacity obtained
* may be less than that requested if the memory is unavailable;
* you should compare len with the .second return value.
*
* Provides the nothrow exception guarantee.
*/
template<typename _Tp>
pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __len) _GLIBCXX_NOEXCEPT
{
const ptrdiff_t __max =
__gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
if (__len > __max)
__len = __max;
while (__len > 0)
{
_Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
std::nothrow));
if (__tmp != 0)
return std::pair<_Tp*, ptrdiff_t>(__tmp, __len);
__len /= 2;
}
return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
}
/**
* @brief The companion to get_temporary_buffer().
* @param __p A buffer previously allocated by get_temporary_buffer.
* @return None.
*
* Frees the memory pointed to by __p.
*/
template<typename _Tp>
inline void
return_temporary_buffer(_Tp* __p)
{ ::operator delete(__p, std::nothrow); }
/**
* This class is used in two places: stl_algo.h and ext/memory,
* where it is wrapped as the temporary_buffer class. See
* temporary_buffer docs for more notes.
*/
template<typename _ForwardIterator, typename _Tp>
class _Temporary_buffer
{
// concept requirements
__glibcxx_class_requires(_ForwardIterator, _ForwardIteratorConcept)
public:
typedef _Tp value_type;
typedef value_type* pointer;
typedef pointer iterator;
typedef ptrdiff_t size_type;
protected:
size_type _M_original_len;
size_type _M_len;
pointer _M_buffer;
public:
/// As per Table mumble.
size_type
size() const
{ return _M_len; }
/// Returns the size requested by the constructor; may be >size().
size_type
requested_size() const
{ return _M_original_len; }
/// As per Table mumble.
iterator
begin()
{ return _M_buffer; }
/// As per Table mumble.
iterator
end()
{ return _M_buffer + _M_len; }
/**
* Constructs a temporary buffer of a size somewhere between
* zero and the size of the given range.
*/
_Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last);
~_Temporary_buffer()
{
std::_Destroy(_M_buffer, _M_buffer + _M_len);
std::return_temporary_buffer(_M_buffer);
}
private:
// Disable copy constructor and assignment operator.
_Temporary_buffer(const _Temporary_buffer&);
void
operator=(const _Temporary_buffer&);
};
template<bool>
struct __uninitialized_construct_buf_dispatch
{
template<typename _Pointer, typename _ForwardIterator>
static void
__ucr(_Pointer __first, _Pointer __last,
_ForwardIterator __seed)
{
if(__first == __last)
return;
_Pointer __cur = __first;
__try
{
std::_Construct(std::__addressof(*__first),
_GLIBCXX_MOVE(*__seed));
_Pointer __prev = __cur;
++__cur;
for(; __cur != __last; ++__cur, ++__prev)
std::_Construct(std::__addressof(*__cur),
_GLIBCXX_MOVE(*__prev));
*__seed = _GLIBCXX_MOVE(*__prev);
}
__catch(...)
{
std::_Destroy(__first, __cur);
__throw_exception_again;
}
}
};
template<>
struct __uninitialized_construct_buf_dispatch<true>
{
template<typename _Pointer, typename _ForwardIterator>
static void
__ucr(_Pointer, _Pointer, _ForwardIterator) { }
};
// Constructs objects in the range [first, last).
// Note that while these new objects will take valid values,
// their exact value is not defined. In particular they may
// be 'moved from'.
//
// While *__seed may be altered during this algorithm, it will have
// the same value when the algorithm finishes, unless one of the
// constructions throws.
//
// Requirements: _Pointer::value_type(_Tp&&) is valid.
template<typename _Pointer, typename _ForwardIterator>
inline void
__uninitialized_construct_buf(_Pointer __first, _Pointer __last,
_ForwardIterator __seed)
{
typedef typename std::iterator_traits<_Pointer>::value_type
_ValueType;
std::__uninitialized_construct_buf_dispatch<
__has_trivial_constructor(_ValueType)>::
__ucr(__first, __last, __seed);
}
template<typename _ForwardIterator, typename _Tp>
_Temporary_buffer<_ForwardIterator, _Tp>::
_Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
: _M_original_len(std::distance(__first, __last)),
_M_len(0), _M_buffer(0)
{
__try
{
std::pair<pointer, size_type> __p(std::get_temporary_buffer<
value_type>(_M_original_len));
_M_buffer = __p.first;
_M_len = __p.second;
if (_M_buffer)
std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len,
__first);
}
__catch(...)
{
std::return_temporary_buffer(_M_buffer);
_M_buffer = 0;
_M_len = 0;
__throw_exception_again;
}
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _STL_TEMPBUF_H */
# 271 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_tempbuf.h" 3
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_raw_storage_iter.h>
#endif /* expanded by -frewrite-includes */
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_raw_storage_iter.h" 1 3
// -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_raw_storage_iter.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{memory}
*/
#ifndef _STL_RAW_STORAGE_ITERATOR_H
#define _STL_RAW_STORAGE_ITERATOR_H 1
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* This iterator class lets algorithms store their results into
* uninitialized memory.
*/
template <class _OutputIterator, class _Tp>
class raw_storage_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
_OutputIterator _M_iter;
public:
explicit
raw_storage_iterator(_OutputIterator __x)
: _M_iter(__x) {}
raw_storage_iterator&
operator*() { return *this; }
raw_storage_iterator&
operator=(const _Tp& __element)
{
std::_Construct(std::__addressof(*_M_iter), __element);
return *this;
}
raw_storage_iterator<_OutputIterator, _Tp>&
operator++()
{
++_M_iter;
return *this;
}
raw_storage_iterator<_OutputIterator, _Tp>
operator++(int)
{
raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this;
++_M_iter;
return __tmp;
}
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 109 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_raw_storage_iter.h" 3
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
# include <exception> // std::exception
#endif /* expanded by -frewrite-includes */
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
#if 0 /* expanded by -frewrite-includes */
# include <typeinfo> // std::type_info in get_deleter
#endif /* expanded by -frewrite-includes */
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 1 3
// RTTI support for -*- C++ -*-
// Copyright (C) 1994-2014 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file typeinfo
* This is a Standard C++ Library header.
*/
#ifndef _TYPEINFO
#define _TYPEINFO
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#if 0 /* expanded by -frewrite-includes */
#include <exception>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <bits/hash_bytes.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/hash_bytes.h" 1 3
// Declarations for hash functions. -*- C++ -*-
// Copyright (C) 2010-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/hash_bytes.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{functional}
*/
#ifndef _HASH_BYTES_H
#define _HASH_BYTES_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/hash_bytes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/hash_bytes.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/hash_bytes.h" 3
namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Hash function implementation for the nontrivial specialization.
// All of them are based on a primitive that hashes a pointer to a
// byte array. The actual hash algorithm is not guaranteed to stay
// the same from release to release -- it may be updated or tuned to
// improve hash quality or speed.
size_t
_Hash_bytes(const void* __ptr, size_t __len, size_t __seed);
// A similar hash primitive, using the FNV hash algorithm. This
// algorithm is guaranteed to stay the same from release to release.
// (although it might not produce the same values on different
// machines.)
size_t
_Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed);
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/hash_bytes.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 2 3
#endif
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#pragma GCC visibility push(default)
extern "C++" {
namespace __cxxabiv1
{
class __class_type_info;
} // namespace __cxxabiv1
// Determine whether typeinfo names for the same type are merged (in which
// case comparison can just compare pointers) or not (in which case strings
// must be compared), and whether comparison is to be implemented inline or
// not. We used to do inline pointer comparison by default if weak symbols
// are available, but even with weak symbols sometimes names are not merged
// when objects are loaded with RTLD_LOCAL, so now we always use strcmp by
// default. For ABI compatibility, we do the strcmp inline if weak symbols
// are available, and out-of-line if not. Out-of-line pointer comparison
// is used where the object files are to be portable to multiple systems,
// some of which may not be able to use pointer comparison, but the
// particular system for which libstdc++ is being built can use pointer
// comparison; in particular for most ARM EABI systems, where the ABI
// specifies out-of-line comparison. The compiler's target configuration
// can override the defaults by defining __GXX_TYPEINFO_EQUALITY_INLINE to
// 1 or 0 to indicate whether or not comparison is inline, and
// __GXX_MERGED_TYPEINFO_NAMES to 1 or 0 to indicate whether or not pointer
// comparison can be used.
#ifndef __GXX_MERGED_TYPEINFO_NAMES
// By default, typeinfo names are not merged.
#define __GXX_MERGED_TYPEINFO_NAMES 0
#endif
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
// By default follow the old inline rules to avoid ABI changes.
#ifndef __GXX_TYPEINFO_EQUALITY_INLINE
#if !__GXX_WEAK__
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#else
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#define __GXX_TYPEINFO_EQUALITY_INLINE 1
#endif
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#endif
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
namespace std
{
/**
* @brief Part of RTTI.
*
* The @c type_info class describes type information generated by
* an implementation.
*/
class type_info
{
public:
/** Destructor first. Being the first non-inline virtual function, this
* controls in which translation unit the vtable is emitted. The
* compiler makes use of that information to know where to emit
* the runtime-mandated type_info structures in the new-abi. */
virtual ~type_info();
/** Returns an @e implementation-defined byte string; this is not
* portable between compilers! */
const char* name() const _GLIBCXX_NOEXCEPT
{ return __name[0] == '*' ? __name + 1 : __name; }
#if !__GXX_TYPEINFO_EQUALITY_INLINE
// In old abi, or when weak symbols are not supported, there can
// be multiple instances of a type_info object for one
// type. Uniqueness must use the _name value, not object address.
bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT;
bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT;
#else
# 109 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#if !__GXX_MERGED_TYPEINFO_NAMES
/** Returns true if @c *this precedes @c __arg in the implementation's
* collation order. */
// Even with the new abi, on systems that support dlopen
// we can run into cases where type_info names aren't merged,
// so we still need to do string comparison.
bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT
{ return (__name[0] == '*' && __arg.__name[0] == '*')
? __name < __arg.__name
: __builtin_strcmp (__name, __arg.__name) < 0; }
bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT
{
return ((__name == __arg.__name)
|| (__name[0] != '*' &&
__builtin_strcmp (__name, __arg.__name) == 0));
}
#else
# 127 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
// On some targets we can rely on type_info's NTBS being unique,
// and therefore address comparisons are sufficient.
bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT
{ return __name < __arg.__name; }
bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT
{ return __name == __arg.__name; }
#endif
# 135 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
#endif
# 136 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
bool operator!=(const type_info& __arg) const _GLIBCXX_NOEXCEPT
{ return !operator==(__arg); }
#if __cplusplus >= 201103L
size_t hash_code() const noexcept
{
# if !__GXX_MERGED_TYPEINFO_NAMES
return _Hash_bytes(name(), __builtin_strlen(name()),
static_cast<size_t>(0xc70f6907UL));
# else
# 146 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
return reinterpret_cast<size_t>(__name);
# endif
# 148 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
}
#endif // C++11
# 150 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
// Return true if this is a pointer type of some kind
virtual bool __is_pointer_p() const;
// Return true if this is a function type
virtual bool __is_function_p() const;
// Try and catch a thrown type. Store an adjusted pointer to the
// caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
// THR_OBJ points to the thrown object. If THR_TYPE is a pointer
// type, then THR_OBJ is the pointer itself. OUTER indicates the
// number of outer pointers, and whether they were const
// qualified.
virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
unsigned __outer) const;
// Internally used during catch matching
virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
protected:
const char *__name;
explicit type_info(const char *__n): __name(__n) { }
private:
/// Assigning type_info is not supported.
type_info& operator=(const type_info&);
type_info(const type_info&);
};
/**
* @brief Thrown during incorrect typecasting.
* @ingroup exceptions
*
* If you attempt an invalid @c dynamic_cast expression, an instance of
* this class (or something derived from this class) is thrown. */
class bad_cast : public exception
{
public:
bad_cast() _GLIBCXX_USE_NOEXCEPT { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_cast() _GLIBCXX_USE_NOEXCEPT;
// See comment in eh_exception.cc.
virtual const char* what() const _GLIBCXX_USE_NOEXCEPT;
};
/**
* @brief Thrown when a NULL pointer in a @c typeid expression is used.
* @ingroup exceptions
*/
class bad_typeid : public exception
{
public:
bad_typeid () _GLIBCXX_USE_NOEXCEPT { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_typeid() _GLIBCXX_USE_NOEXCEPT;
// See comment in eh_exception.cc.
virtual const char* what() const _GLIBCXX_USE_NOEXCEPT;
};
} // namespace std
} // extern "C++"
#pragma GCC visibility pop
#endif
# 223 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/typeinfo" 3
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <iosfwd> // std::basic_ostream
#endif /* expanded by -frewrite-includes */
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 1 3
// <iosfwd> Forward declarations -*- C++ -*-
// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file include/iosfwd
* This is a Standard C++ Library header.
*/
//
// ISO C++ 14882: 27.2 Forward declarations
//
#ifndef _GLIBCXX_IOSFWD
#define _GLIBCXX_IOSFWD 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stringfwd.h> // For string forward declarations.
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 1 3
// <string> Forward declarations -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/stringfwd.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{string}
*/
//
// ISO C++ 14882: 21 Strings library
//
#ifndef _STRINGFWD_H
#define _STRINGFWD_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/memoryfwd.h>
#endif /* expanded by -frewrite-includes */
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
#ifdef _GLIBCXX_USE_FB
#define basic_string basic_fbstring
#endif
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup strings Strings
*
* @{
*/
template<class _CharT>
struct char_traits;
#ifdef _GLIBCXX_USE_FB
template <class _CharT>
class fbstring_core;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT>,
typename _Storage = fbstring_core<_CharT> >
class basic_string;
#else
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
#endif // _GLIBCXX_USE_FB
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
template<> struct char_traits<char>;
/// A string of @c char
typedef basic_string<char> string;
#ifdef _GLIBCXX_USE_WCHAR_T
template<> struct char_traits<wchar_t>;
/// A string of @c wchar_t
typedef basic_string<wchar_t> wstring;
#endif
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
#if ((__cplusplus >= 201103L) \
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
template<> struct char_traits<char16_t>;
template<> struct char_traits<char32_t>;
/// A string of @c char16_t
typedef basic_string<char16_t> u16string;
/// A string of @c char32_t
typedef basic_string<char32_t> u32string;
#endif
# 98 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
/** @} */
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif // _STRINGFWD_H
# 104 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stringfwd.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/postypes.h>
#endif /* expanded by -frewrite-includes */
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 1 3
// Position types -*- C++ -*-
// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file bits/postypes.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{iosfwd}
*/
//
// ISO C++ 14882: 27.4.1 - Types
// ISO C++ 14882: 27.4.3 - Template class fpos
//
#ifndef _GLIBCXX_POSTYPES_H
#define _GLIBCXX_POSTYPES_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <cwchar> // For mbstate_t
#endif /* expanded by -frewrite-includes */
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 1 3
// -*- C++ -*- forwarding header.
// Copyright (C) 1997-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file include/cwchar
* This is a Standard C++ Library file. You should @c \#include this file
* in your programs, rather than any of the @a *.h implementation files.
*
* This is the C++ version of the Standard C Library header @c wchar.h,
* and its contents are (mostly) the same as that header, but are all
* contained in the namespace @c std (except for names which are defined
* as macros in C).
*/
//
// ISO C++ 14882: 21.4
//
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
# 42 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_HAVE_WCHAR_H
#if 0 /* expanded by -frewrite-includes */
#include <wchar.h>
#endif /* expanded by -frewrite-includes */
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 1 3
/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* ISO C99 Standard: 7.24
* Extended multibyte and wide character utilities <wchar.h>
*/
#ifndef _WCHAR_H
#if !defined __need_mbstate_t && !defined __need_wint_t
# define _WCHAR_H 1
#if 0 /* expanded by -frewrite-includes */
# include <features.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 29 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef _WCHAR_H
/* Get FILE definition. */
# define __need___FILE
# if defined __USE_UNIX98 || defined __USE_XOPEN2K
# define __need_FILE
# endif
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#if 0 /* expanded by -frewrite-includes */
# include <stdio.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 1 3
/* Define ISO C stdio on top of C++ iostreams.
Copyright (C) 1991-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* ISO C99 Standard: 7.19 Input/output <stdio.h>
*/
#ifndef _STDIO_H
#if !defined __need_FILE && !defined __need___FILE
# define _STDIO_H 1
#if 0 /* expanded by -frewrite-includes */
# include <features.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_DECLS
# define __need_size_t
# define __need_NULL
#if 0 /* expanded by -frewrite-includes */
# include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define __need_FILE
# define __need___FILE
#endif /* Don't need FILE. */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if !defined __FILE_defined && defined __need_FILE
/* Define outside of namespace so the C++ is happy. */
struct _IO_FILE;
__BEGIN_NAMESPACE_STD
/* The opaque type of streams. This is the definition used elsewhere. */
typedef struct _IO_FILE FILE;
__END_NAMESPACE_STD
#if defined __USE_LARGEFILE64 || defined __USE_POSIX \
|| defined __USE_ISOC99 || defined __USE_XOPEN \
|| defined __USE_POSIX2
__USING_NAMESPACE_STD(FILE)
#endif
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define __FILE_defined 1
#endif /* FILE not defined. */
# 58 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#undef __need_FILE
#if !defined ____FILE_defined && defined __need___FILE
/* The opaque type of streams. This is the definition used elsewhere. */
typedef struct _IO_FILE __FILE;
# define ____FILE_defined 1
#endif /* __FILE not defined. */
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#undef __need___FILE
#ifdef _STDIO_H
#define _STDIO_USES_IOSTREAM
#if 0 /* expanded by -frewrite-includes */
#include <libio.h>
#endif /* expanded by -frewrite-includes */
# 74 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 75 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if defined __USE_XOPEN || defined __USE_XOPEN2K8
# ifdef __GNUC__
# ifndef _VA_LIST_DEFINED
typedef _G_va_list va_list;
# define _VA_LIST_DEFINED
# endif
# 82 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# else
# 83 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if 0 /* expanded by -frewrite-includes */
# include <stdarg.h>
#endif /* expanded by -frewrite-includes */
# 83 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# endif
# 85 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_XOPEN2K8
# ifndef __off_t_defined
# ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
# else
# 92 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
typedef __off64_t off_t;
# endif
# 94 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define __off_t_defined
# endif
# 96 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# if defined __USE_LARGEFILE64 && !defined __off64_t_defined
typedef __off64_t off64_t;
# define __off64_t_defined
# endif
# 100 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# ifndef __ssize_t_defined
typedef __ssize_t ssize_t;
# define __ssize_t_defined
# endif
# 105 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 106 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* The type of the second argument to `fgetpos' and `fsetpos'. */
__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
typedef _G_fpos_t fpos_t;
#else
# 112 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
typedef _G_fpos64_t fpos_t;
#endif
# 114 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
typedef _G_fpos64_t fpos64_t;
#endif
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* The possibilities for the third argument to `setvbuf'. */
#define _IOFBF 0 /* Fully buffered. */
#define _IOLBF 1 /* Line buffered. */
#define _IONBF 2 /* No buffering. */
/* Default buffer size. */
#ifndef BUFSIZ
# define BUFSIZ _IO_BUFSIZ
#endif
# 129 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* End of file character.
Some things throughout the library rely on this being -1. */
#ifndef EOF
# define EOF (-1)
#endif
# 136 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* The possibilities for the third argument to `fseek'.
These values should not be changed. */
#define SEEK_SET 0 /* Seek from beginning of file. */
#define SEEK_CUR 1 /* Seek from current position. */
#define SEEK_END 2 /* Seek from end of file. */
#ifdef __USE_GNU
# define SEEK_DATA 3 /* Seek to next data. */
# define SEEK_HOLE 4 /* Seek to next hole. */
#endif
# 147 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if defined __USE_MISC || defined __USE_XOPEN
/* Default path prefix for `tempnam' and `tmpnam'. */
# define P_tmpdir "/tmp"
#endif
# 153 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* Get the values:
L_tmpnam How long an array of chars must be to be passed to `tmpnam'.
TMP_MAX The minimum number of unique filenames generated by tmpnam
(and tempnam when it uses tmpnam's name space),
or tempnam (the two are separate).
L_ctermid How long an array to pass to `ctermid'.
L_cuserid How long an array to pass to `cuserid'.
FOPEN_MAX Minimum number of files that can be open at once.
FILENAME_MAX Maximum length of a filename. */
#if 0 /* expanded by -frewrite-includes */
#include <bits/stdio_lim.h>
#endif /* expanded by -frewrite-includes */
# 164 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 165 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* Standard streams. */
extern struct _IO_FILE *stdin; /* Standard input stream. */
extern struct _IO_FILE *stdout; /* Standard output stream. */
extern struct _IO_FILE *stderr; /* Standard error output stream. */
/* C89/C99 say they're macros. Make them happy. */
#define stdin stdin
#define stdout stdout
#define stderr stderr
__BEGIN_NAMESPACE_STD
/* Remove file FILENAME. */
extern int remove (const char *__filename) __THROW;
/* Rename file OLD to NEW. */
extern int rename (const char *__old, const char *__new) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_ATFILE
/* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */
extern int renameat (int __oldfd, const char *__old, int __newfd,
const char *__new) __THROW;
#endif
# 188 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Create a temporary file and open it read/write.
This function is a possible cancellation point and therefore not
marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
extern FILE *tmpfile (void) __wur;
#else
# 197 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# ifdef __REDIRECT
extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur;
# else
# 200 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define tmpfile tmpfile64
# endif
# 202 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 203 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_LARGEFILE64
extern FILE *tmpfile64 (void) __wur;
#endif
# 207 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* Generate a temporary filename. */
extern char *tmpnam (char *__s) __THROW __wur;
__END_NAMESPACE_STD
#ifdef __USE_MISC
/* This is the reentrant variant of `tmpnam'. The only difference is
that it does not allow S to be NULL. */
extern char *tmpnam_r (char *__s) __THROW __wur;
#endif
# 217 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if defined __USE_MISC || defined __USE_XOPEN
/* Generate a unique temporary filename using up to five characters of PFX
if it is not NULL. The directory to put this file in is searched for
as follows: First the environment variable "TMPDIR" is checked.
If it contains the name of a writable directory, that directory is used.
If not and if DIR is not NULL, that value is checked. If that fails,
P_tmpdir is tried and finally "/tmp". The storage for the filename
is allocated by `malloc'. */
extern char *tempnam (const char *__dir, const char *__pfx)
__THROW __attribute_malloc__ __wur;
#endif
# 230 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Close STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fclose (FILE *__stream);
/* Flush STREAM, or all streams if STREAM is NULL.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fflush (FILE *__stream);
__END_NAMESPACE_STD
#ifdef __USE_MISC
/* Faster versions when locking is not required.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int fflush_unlocked (FILE *__stream);
#endif
# 254 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_GNU
/* Close all streams.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int fcloseall (void);
#endif
# 264 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
/* Open a file and create a new stream for it.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern FILE *fopen (const char *__restrict __filename,
const char *__restrict __modes) __wur;
/* Open a file, replacing an existing stream with it.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern FILE *freopen (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream) __wur;
#else
# 282 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# ifdef __REDIRECT
extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
const char *__restrict __modes), fopen64)
__wur;
extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream), freopen64)
__wur;
# else
# 291 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define fopen fopen64
# define freopen freopen64
# endif
# 294 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 295 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
extern FILE *fopen64 (const char *__restrict __filename,
const char *__restrict __modes) __wur;
extern FILE *freopen64 (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream) __wur;
#endif
# 303 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_POSIX
/* Create a new stream that refers to an existing system file descriptor. */
extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
#endif
# 308 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_GNU
/* Create a new stream that refers to the given magic cookie,
and uses the given functions for input and output. */
extern FILE *fopencookie (void *__restrict __magic_cookie,
const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) __THROW __wur;
#endif
# 316 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_XOPEN2K8
/* Create a new stream that refers to a memory buffer. */
extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
__THROW __wur;
/* Open a stream that writes into a malloc'd buffer that is expanded as
necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
and the number of characters written on fflush or fclose. */
extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
#endif
# 327 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* If BUF is NULL, make STREAM unbuffered.
Else make it use buffer BUF, of size BUFSIZ. */
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
/* Make STREAM use buffering mode MODE.
If BUF is not NULL, use N bytes of it for buffering;
else allocate an internal buffer N bytes long. */
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_MISC
/* If BUF is NULL, make STREAM unbuffered.
Else make it use SIZE bytes of BUF for buffering. */
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) __THROW;
/* Make STREAM line-buffered. */
extern void setlinebuf (FILE *__stream) __THROW;
#endif
# 349 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Write formatted output to STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fprintf (FILE *__restrict __stream,
const char *__restrict __format, ...);
/* Write formatted output to stdout.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int printf (const char *__restrict __format, ...);
/* Write formatted output to S. */
extern int sprintf (char *__restrict __s,
const char *__restrict __format, ...) __THROWNL;
/* Write formatted output to S from argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
_G_va_list __arg);
/* Write formatted output to stdout from argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vprintf (const char *__restrict __format, _G_va_list __arg);
/* Write formatted output to S from argument list ARG. */
extern int vsprintf (char *__restrict __s, const char *__restrict __format,
_G_va_list __arg) __THROWNL;
__END_NAMESPACE_STD
#if defined __USE_ISOC99 || defined __USE_UNIX98
__BEGIN_NAMESPACE_C99
/* Maximum chars of output to write in MAXLEN. */
extern int snprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, _G_va_list __arg)
__THROWNL __attribute__ ((__format__ (__printf__, 3, 0)));
__END_NAMESPACE_C99
#endif
# 395 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_GNU
/* Write formatted output to a string dynamically allocated with `malloc'.
Store the address of the string in *PTR. */
extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
_G_va_list __arg)
__THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur;
extern int __asprintf (char **__restrict __ptr,
const char *__restrict __fmt, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
extern int asprintf (char **__restrict __ptr,
const char *__restrict __fmt, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
#endif
# 409 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_XOPEN2K8
/* Write formatted output to a file descriptor. */
extern int vdprintf (int __fd, const char *__restrict __fmt,
_G_va_list __arg)
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, const char *__restrict __fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
#endif
# 418 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Read formatted input from STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fscanf (FILE *__restrict __stream,
const char *__restrict __format, ...) __wur;
/* Read formatted input from stdin.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int scanf (const char *__restrict __format, ...) __wur;
/* Read formatted input from S. */
extern int sscanf (const char *__restrict __s,
const char *__restrict __format, ...) __THROW;
#if defined __USE_ISOC99 && !defined __USE_GNU \
&& (!defined __LDBL_COMPAT || !defined __REDIRECT) \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
# ifdef __REDIRECT
/* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[
GNU extension which conflicts with valid %a followed by letter
s, S or [. */
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
const char *__restrict __format, ...),
__isoc99_fscanf) __wur;
extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
__isoc99_scanf) __wur;
extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s,
const char *__restrict __format, ...),
__isoc99_sscanf);
# else
# 452 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
extern int __isoc99_fscanf (FILE *__restrict __stream,
const char *__restrict __format, ...) __wur;
extern int __isoc99_scanf (const char *__restrict __format, ...) __wur;
extern int __isoc99_sscanf (const char *__restrict __s,
const char *__restrict __format, ...) __THROW;
# define fscanf __isoc99_fscanf
# define scanf __isoc99_scanf
# define sscanf __isoc99_sscanf
# endif
# 461 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 462 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Read formatted input from S into argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
_G_va_list __arg)
__attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
/* Read formatted input from stdin into argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vscanf (const char *__restrict __format, _G_va_list __arg)
__attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
/* Read formatted input from S into argument list ARG. */
extern int vsscanf (const char *__restrict __s,
const char *__restrict __format, _G_va_list __arg)
__THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
# if !defined __USE_GNU \
&& (!defined __LDBL_COMPAT || !defined __REDIRECT) \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
# ifdef __REDIRECT
/* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[
GNU extension which conflicts with valid %a followed by letter
s, S or [. */
extern int __REDIRECT (vfscanf,
(FILE *__restrict __s,
const char *__restrict __format, _G_va_list __arg),
__isoc99_vfscanf)
__attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
extern int __REDIRECT (vscanf, (const char *__restrict __format,
_G_va_list __arg), __isoc99_vscanf)
__attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
extern int __REDIRECT_NTH (vsscanf,
(const char *__restrict __s,
const char *__restrict __format,
_G_va_list __arg), __isoc99_vsscanf)
__attribute__ ((__format__ (__scanf__, 2, 0)));
# else
# 508 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
extern int __isoc99_vfscanf (FILE *__restrict __s,
const char *__restrict __format,
_G_va_list __arg) __wur;
extern int __isoc99_vscanf (const char *__restrict __format,
_G_va_list __arg) __wur;
extern int __isoc99_vsscanf (const char *__restrict __s,
const char *__restrict __format,
_G_va_list __arg) __THROW;
# define vfscanf __isoc99_vfscanf
# define vscanf __isoc99_vscanf
# define vsscanf __isoc99_vsscanf
# endif
# 520 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# endif
# 521 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_NAMESPACE_C99
#endif /* Use ISO C9x. */
# 524 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Read a character from STREAM.
These functions are possible cancellation points and therefore not
marked with __THROW. */
extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);
/* Read a character from stdin.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int getchar (void);
__END_NAMESPACE_STD
/* The C standard explicitly says this is a macro, so we always do the
optimization for it. */
#define getc(_fp) _IO_getc (_fp)
#ifdef __USE_POSIX
/* These are defined in POSIX.1:1996.
These functions are possible cancellation points and therefore not
marked with __THROW. */
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
#endif /* Use POSIX. */
# 553 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_MISC
/* Faster version when locking is not necessary.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int fgetc_unlocked (FILE *__stream);
#endif /* Use MISC. */
# 563 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Write a character to STREAM.
These functions are possible cancellation points and therefore not
marked with __THROW.
These functions is a possible cancellation point and therefore not
marked with __THROW. */
extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);
/* Write a character to stdout.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int putchar (int __c);
__END_NAMESPACE_STD
/* The C standard explicitly says this can be a macro,
so we always do the optimization for it. */
#define putc(_ch, _fp) _IO_putc (_ch, _fp)
#ifdef __USE_MISC
/* Faster version when locking is not necessary.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int fputc_unlocked (int __c, FILE *__stream);
#endif /* Use MISC. */
# 596 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_POSIX
/* These are defined in POSIX.1:1996.
These functions are possible cancellation points and therefore not
marked with __THROW. */
extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);
#endif /* Use POSIX. */
# 605 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if defined __USE_MISC \
|| (defined __USE_XOPEN && !defined __USE_XOPEN2K)
/* Get a word (int) from STREAM. */
extern int getw (FILE *__stream);
/* Write a word (int) to STREAM. */
extern int putw (int __w, FILE *__stream);
#endif
# 615 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Get a newline-terminated string of finite length from STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
__wur;
#if !defined __USE_ISOC11 \
|| (defined __cplusplus && __cplusplus <= 201103L)
/* Get a newline-terminated string from stdin, removing the newline.
DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.
The function has been officially removed in ISO C11. This opportunity
is used to also remove it from the GNU feature list. It is now only
available when explicitly using an old ISO C, Unix, or POSIX standard.
GCC defines _GNU_SOURCE when building C++ code and the function is still
in C++11, so it is also available for C++.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern char *gets (char *__s) __wur __attribute_deprecated__;
#endif
# 640 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_NAMESPACE_STD
#ifdef __USE_GNU
/* This function does the same as `fgets' but does not lock the stream.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern char *fgets_unlocked (char *__restrict __s, int __n,
FILE *__restrict __stream) __wur;
#endif
# 652 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_XOPEN2K8
/* Read up to (and including) a DELIMITER from STREAM into *LINEPTR
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
NULL), pointing to *N characters of space. It is realloc'd as
necessary. Returns the number of characters read (not including the
null terminator), or -1 on error or EOF.
These functions are not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation they are cancellation points and
therefore not marked with __THROW. */
extern _IO_ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) __wur;
extern _IO_ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) __wur;
/* Like `getdelim', but reads up to a newline.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern _IO_ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) __wur;
#endif
# 682 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Write a string to STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
/* Write a string, followed by a newline, to stdout.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int puts (const char *__s);
/* Push a character back onto the input buffer of STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int ungetc (int __c, FILE *__stream);
/* Read chunks of generic data from STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) __wur;
/* Write chunks of generic data to STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s);
__END_NAMESPACE_STD
#ifdef __USE_GNU
/* This function does the same as `fputs' but does not lock the stream.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int fputs_unlocked (const char *__restrict __s,
FILE *__restrict __stream);
#endif
# 729 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_MISC
/* Faster versions when locking is not necessary.
These functions are not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation they are cancellation points and
therefore not marked with __THROW. */
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) __wur;
extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream);
#endif
# 742 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Seek to a certain position on STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fseek (FILE *__stream, long int __off, int __whence);
/* Return the current position of STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern long int ftell (FILE *__stream) __wur;
/* Rewind to the beginning of STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void rewind (FILE *__stream);
__END_NAMESPACE_STD
/* The Single Unix Specification, Version 2, specifies an alternative,
more adequate interface for the two functions above which deal with
file offset. `long int' is not the right type. These definitions
are originally defined in the Large File Support API. */
#if defined __USE_LARGEFILE || defined __USE_XOPEN2K
# ifndef __USE_FILE_OFFSET64
/* Seek to a certain position on STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fseeko (FILE *__stream, __off_t __off, int __whence);
/* Return the current position of STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern __off_t ftello (FILE *__stream) __wur;
# else
# 780 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# ifdef __REDIRECT
extern int __REDIRECT (fseeko,
(FILE *__stream, __off64_t __off, int __whence),
fseeko64);
extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64);
# else
# 786 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define fseeko fseeko64
# define ftello ftello64
# endif
# 789 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# endif
# 790 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 791 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
/* Get STREAM's position.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
/* Set STREAM's position.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fsetpos (FILE *__stream, const fpos_t *__pos);
#else
# 805 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# ifdef __REDIRECT
extern int __REDIRECT (fgetpos, (FILE *__restrict __stream,
fpos_t *__restrict __pos), fgetpos64);
extern int __REDIRECT (fsetpos,
(FILE *__stream, const fpos_t *__pos), fsetpos64);
# else
# 811 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# define fgetpos fgetpos64
# define fsetpos fsetpos64
# endif
# 814 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 815 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) __wur;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
#endif
# 823 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Clear the error and EOF indicators for STREAM. */
extern void clearerr (FILE *__stream) __THROW;
/* Return the EOF indicator for STREAM. */
extern int feof (FILE *__stream) __THROW __wur;
/* Return the error indicator for STREAM. */
extern int ferror (FILE *__stream) __THROW __wur;
__END_NAMESPACE_STD
#ifdef __USE_MISC
/* Faster versions when locking is not required. */
extern void clearerr_unlocked (FILE *__stream) __THROW;
extern int feof_unlocked (FILE *__stream) __THROW __wur;
extern int ferror_unlocked (FILE *__stream) __THROW __wur;
#endif
# 839 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__BEGIN_NAMESPACE_STD
/* Print a message describing the meaning of the value of errno.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void perror (const char *__s);
__END_NAMESPACE_STD
/* Provide the declarations for `sys_errlist' and `sys_nerr' if they
are available on this system. Even if available, these variables
should not be used directly. The `strerror' function provides
all the necessary functionality. */
#if 0 /* expanded by -frewrite-includes */
#include <bits/sys_errlist.h>
#endif /* expanded by -frewrite-includes */
# 853 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 854 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_POSIX
/* Return the system file descriptor for STREAM. */
extern int fileno (FILE *__stream) __THROW __wur;
#endif /* Use POSIX. */
# 860 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_MISC
/* Faster version when locking is not required. */
extern int fileno_unlocked (FILE *__stream) __THROW __wur;
#endif
# 865 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_POSIX2
/* Create a new stream connected to a pipe running the given command.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern FILE *popen (const char *__command, const char *__modes) __wur;
/* Close a stream opened by popen and return the status of its child.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int pclose (FILE *__stream);
#endif
# 880 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_POSIX
/* Return the name of the controlling terminal. */
extern char *ctermid (char *__s) __THROW;
#endif /* Use POSIX. */
# 886 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_XOPEN
/* Return the name of the current user. */
extern char *cuserid (char *__s);
#endif /* Use X/Open, but not issue 6. */
# 892 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_GNU
struct obstack; /* See <obstack.h>. */
/* Write formatted output to an obstack. */
extern int obstack_printf (struct obstack *__restrict __obstack,
const char *__restrict __format, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
const char *__restrict __format,
_G_va_list __args)
__THROWNL __attribute__ ((__format__ (__printf__, 2, 0)));
#endif /* Use GNU. */
# 906 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __USE_POSIX
/* These are defined in POSIX.1:1996. */
/* Acquire ownership of STREAM. */
extern void flockfile (FILE *__stream) __THROW;
/* Try to acquire ownership of STREAM but do not block if it is not
possible. */
extern int ftrylockfile (FILE *__stream) __THROW __wur;
/* Relinquish the ownership granted for STREAM. */
extern void funlockfile (FILE *__stream) __THROW;
#endif /* POSIX */
# 921 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU
/* The X/Open standard requires some functions and variables to be
declared here which do not belong into this header. But we have to
follow. In GNU mode we don't do this nonsense. */
# define __need_getopt
#if 0 /* expanded by -frewrite-includes */
# include <getopt.h>
#endif /* expanded by -frewrite-includes */
# 927 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 928 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif /* X/Open, but not issue 6 and not for GNU. */
# 929 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
/* If we are compiling with optimizing read this file. It contains
several optimizing inline functions and macros. */
#ifdef __USE_EXTERN_INLINES
#if 0 /* expanded by -frewrite-includes */
# include <bits/stdio.h>
#endif /* expanded by -frewrite-includes */
# 933 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 934 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 935 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
#if 0 /* expanded by -frewrite-includes */
# include <bits/stdio2.h>
#endif /* expanded by -frewrite-includes */
# 936 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 937 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 938 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#ifdef __LDBL_COMPAT
#if 0 /* expanded by -frewrite-includes */
# include <bits/stdio-ldbl.h>
#endif /* expanded by -frewrite-includes */
# 939 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 940 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif
# 941 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
__END_DECLS
#endif /* <stdio.h> included. */
# 945 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
#endif /* !_STDIO_H */
# 947 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/stdio.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 2 3
/* Get va_list definition. */
# define __need___va_list
#if 0 /* expanded by -frewrite-includes */
# include <stdarg.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stdarg.h" 1 3
/*===---- stdarg.h - Variable argument handling ----------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __STDARG_H
#define __STDARG_H
#ifndef _VA_LIST
typedef __builtin_va_list va_list;
#define _VA_LIST
#endif
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stdarg.h" 3
#define va_start(ap, param) __builtin_va_start(ap, param)
#define va_end(ap) __builtin_va_end(ap)
#define va_arg(ap, type) __builtin_va_arg(ap, type)
/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
* or -ansi is not specified, since it was not part of C90.
*/
#define __va_copy(d,s) __builtin_va_copy(d,s)
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
#define va_copy(dest, src) __builtin_va_copy(dest, src)
#endif
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stdarg.h" 3
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST 1
typedef __builtin_va_list __gnuc_va_list;
#endif
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stdarg.h" 3
#endif /* __STDARG_H */
# 52 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stdarg.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/wchar.h>
#endif /* expanded by -frewrite-includes */
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 1 3
/* wchar_t type related definitions.
Copyright (C) 2000-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H 1
/* The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__
are not defined, give the right value and type as long as both int
and wchar_t are 32-bit types. Adding L'\0' to a constant value
ensures that the type is correct; it is necessary to use (L'\0' +
0) rather than just L'\0' so that the type in C++ is the promoted
version of wchar_t rather than the distinct wchar_t type itself.
Because wchar_t in preprocessor #if expressions is treated as
intmax_t or uintmax_t, the expression (L'\0' - 1) would have the
wrong value for WCHAR_MAX in such expressions and so cannot be used
to define __WCHAR_MAX in the unsigned case. */
#ifdef __WCHAR_MAX__
# define __WCHAR_MAX __WCHAR_MAX__
#elif L'\0' - 1 > 0
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
# define __WCHAR_MAX (0xffffffffu + L'\0')
#else
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
# define __WCHAR_MAX (0x7fffffff + L'\0')
#endif
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
#ifdef __WCHAR_MIN__
# define __WCHAR_MIN __WCHAR_MIN__
#elif L'\0' - 1 > 0
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
# define __WCHAR_MIN (L'\0' + 0)
#else
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
# define __WCHAR_MIN (-__WCHAR_MAX - 1)
#endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
#endif /* bits/wchar.h */
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wchar.h" 3
# 42 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 2 3
/* Get size_t, wchar_t, wint_t and NULL from <stddef.h>. */
# define __need_size_t
# define __need_wchar_t
# define __need_NULL
#endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#if defined _WCHAR_H || defined __need_wint_t || !defined __WINT_TYPE__
# undef __need_wint_t
# define __need_wint_t
#if 0 /* expanded by -frewrite-includes */
# include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 1 3
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 90 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 93 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# define NULL 0
# endif
# 104 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#else
# 105 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# define NULL ((void*)0)
#endif
# 107 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# 119 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 120 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 138 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# 52 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 2 3
/* We try to get wint_t from <stddef.h>, but not all GCC versions define it
there. So define it ourselves if it remains undefined. */
# ifndef _WINT_T
/* Integral type unchanged by default argument promotions that can
hold any value corresponding to members of the extended character
set, as well as at least one value that does not correspond to any
member of the extended character set. */
# define _WINT_T
typedef unsigned int wint_t;
# else
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Work around problems with the <stddef.h> file which doesn't put
wint_t in the std namespace. */
# if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES \
&& defined __WINT_TYPE__
__BEGIN_NAMESPACE_STD
typedef __WINT_TYPE__ wint_t;
__END_NAMESPACE_STD
# endif
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# endif
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Tell the caller that we provide correct C++ prototypes. */
# if defined __cplusplus && __GNUC_PREREQ (4, 4)
# define __CORRECT_ISO_CPP_WCHAR_H_PROTO
# endif
# 77 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#if (defined _WCHAR_H || defined __need_mbstate_t) && !defined ____mbstate_t_defined
# define ____mbstate_t_defined 1
/* Conversion state information. */
typedef struct
{
int __count;
union
{
# ifdef __WINT_TYPE__
__WINT_TYPE__ __wch;
# else
# 90 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
wint_t __wch;
# endif
# 92 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
char __wchb[4];
} __value; /* Value so far. */
} __mbstate_t;
#endif
# 96 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#undef __need_mbstate_t
/* The rest of the file is only used if used if __need_mbstate_t is not
defined. */
#ifdef _WCHAR_H
# ifndef __mbstate_t_defined
__BEGIN_NAMESPACE_C99
/* Public type. */
typedef __mbstate_t mbstate_t;
__END_NAMESPACE_C99
# define __mbstate_t_defined 1
# endif
# 110 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __USE_GNU
__USING_NAMESPACE_C99(mbstate_t)
#endif
# 114 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifndef WCHAR_MIN
/* These constants might also be defined in <inttypes.h>. */
# define WCHAR_MIN __WCHAR_MIN
# define WCHAR_MAX __WCHAR_MAX
#endif
# 120 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifndef WEOF
# define WEOF (0xffffffffu)
#endif
# 124 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* For XPG4 compliance we have to define the stuff from <wctype.h> here
as well. */
#if defined __USE_XOPEN && !defined __USE_UNIX98
#if 0 /* expanded by -frewrite-includes */
# include <wctype.h>
#endif /* expanded by -frewrite-includes */
# 128 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 129 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 130 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_DECLS
__BEGIN_NAMESPACE_STD
/* This incomplete type is defined in <time.h> but needed here because
of `wcsftime'. */
struct tm;
__END_NAMESPACE_STD
/* XXX We have to clean this up at some point. Since tm is in the std
namespace but wcsftime is in __c99 the type wouldn't be found
without inserting it in the global namespace. */
__USING_NAMESPACE_STD(tm)
__BEGIN_NAMESPACE_STD
/* Copy SRC to DEST. */
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src) __THROW;
/* Copy no more than N wide-characters of SRC to DEST. */
extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
__THROW;
/* Append SRC onto DEST. */
extern wchar_t *wcscat (wchar_t *__restrict __dest,
const wchar_t *__restrict __src) __THROW;
/* Append no more than N wide-characters of SRC onto DEST. */
extern wchar_t *wcsncat (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
__THROW;
/* Compare S1 and S2. */
extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2)
__THROW __attribute_pure__;
/* Compare N wide-characters of S1 and S2. */
extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
__THROW __attribute_pure__;
__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8
/* Compare S1 and S2, ignoring case. */
extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW;
/* Compare no more than N chars of S1 and S2, ignoring case. */
extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
size_t __n) __THROW;
/* Similar to the two functions above but take the information from
the provided locale and not the global locale. */
#if 0 /* expanded by -frewrite-includes */
# include <xlocale.h>
#endif /* expanded by -frewrite-includes */
# 180 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/xlocale.h" 1 3
/* Definition of locale datatype.
Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _XLOCALE_H
#define _XLOCALE_H 1
/* Structure for reentrant locale using functions. This is an
(almost) opaque type for the user level programs. The file and
this data structure is not standardized. Don't rely on it. It can
go away without warning. */
typedef struct __locale_struct
{
/* Note: LC_ALL is not a valid index into this array. */
struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */
/* To increase the speed of this solution we add some special members. */
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
/* Note: LC_ALL is not a valid index into this array. */
const char *__names[13];
} *__locale_t;
/* POSIX 2008 makes locale_t official. */
typedef __locale_t locale_t;
#endif /* xlocale.h */
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/xlocale.h" 3
# 181 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 2 3
extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
__locale_t __loc) __THROW;
extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
size_t __n, __locale_t __loc) __THROW;
#endif
# 188 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Compare S1 and S2, both interpreted as appropriate to the
LC_COLLATE category of the current locale. */
extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW;
/* Transform S2 into array pointed to by S1 such that if wcscmp is
applied to two transformed strings the result is the as applying
`wcscoll' to the original strings. */
extern size_t wcsxfrm (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8
/* Similar to the two functions above but take the information from
the provided locale and not the global locale. */
/* Compare S1 and S2, both interpreted as appropriate to the
LC_COLLATE category of the given locale. */
extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2,
__locale_t __loc) __THROW;
/* Transform S2 into array pointed to by S1 such that if wcscmp is
applied to two transformed strings the result is the as applying
`wcscoll' to the original strings. */
extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
size_t __n, __locale_t __loc) __THROW;
/* Duplicate S, returning an identical malloc'd string. */
extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;
#endif
# 218 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Find the first occurrence of WC in WCS. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc)
__THROW __asm ("wcschr") __attribute_pure__;
extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
__THROW __asm ("wcschr") __attribute_pure__;
#else
# 227 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
__THROW __attribute_pure__;
#endif
# 230 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Find the last occurrence of WC in WCS. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc)
__THROW __asm ("wcsrchr") __attribute_pure__;
extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
__THROW __asm ("wcsrchr") __attribute_pure__;
#else
# 237 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
__THROW __attribute_pure__;
#endif
# 240 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__END_NAMESPACE_STD
#ifdef __USE_GNU
/* This function is similar to `wcschr'. But it returns a pointer to
the closing NUL wide character in case C is not found in S. */
extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc)
__THROW __attribute_pure__;
#endif
# 248 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Return the length of the initial segmet of WCS which
consists entirely of wide characters not in REJECT. */
extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject)
__THROW __attribute_pure__;
/* Return the length of the initial segmet of WCS which
consists entirely of wide characters in ACCEPT. */
extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept)
__THROW __attribute_pure__;
/* Find the first occurrence in WCS of any character in ACCEPT. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept)
__THROW __asm ("wcspbrk") __attribute_pure__;
extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs,
const wchar_t *__accept)
__THROW __asm ("wcspbrk") __attribute_pure__;
#else
# 266 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept)
__THROW __attribute_pure__;
#endif
# 269 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Find the first occurrence of NEEDLE in HAYSTACK. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle)
__THROW __asm ("wcsstr") __attribute_pure__;
extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack,
const wchar_t *__needle)
__THROW __asm ("wcsstr") __attribute_pure__;
#else
# 277 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle)
__THROW __attribute_pure__;
#endif
# 280 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Divide WCS into tokens separated by characters in DELIM. */
extern wchar_t *wcstok (wchar_t *__restrict __s,
const wchar_t *__restrict __delim,
wchar_t **__restrict __ptr) __THROW;
/* Return the number of wide characters in S. */
extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
__END_NAMESPACE_STD
#ifdef __USE_XOPEN
/* Another name for `wcsstr' from XPG4. */
# ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle)
__THROW __asm ("wcswcs") __attribute_pure__;
extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack,
const wchar_t *__needle)
__THROW __asm ("wcswcs") __attribute_pure__;
# else
# 299 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle)
__THROW __attribute_pure__;
# endif
# 302 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 303 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __USE_XOPEN2K8
/* Return the number of wide characters in S, but at most MAXLEN. */
extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)
__THROW __attribute_pure__;
#endif
# 309 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Search N wide characters of S for C. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n)
__THROW __asm ("wmemchr") __attribute_pure__;
extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c,
size_t __n)
__THROW __asm ("wmemchr") __attribute_pure__;
#else
# 320 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n)
__THROW __attribute_pure__;
#endif
# 323 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Compare N wide characters of S1 and S2. */
extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
__THROW __attribute_pure__;
/* Copy N wide characters of SRC to DEST. */
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n) __THROW;
/* Copy N wide characters of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)
__THROW;
/* Set N wide characters of S to C. */
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_GNU
/* Copy N wide characters of SRC to DEST and return pointer to following
wide character. */
extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n)
__THROW;
#endif
# 348 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Determine whether C constitutes a valid (one-byte) multibyte
character. */
extern wint_t btowc (int __c) __THROW;
/* Determine whether C corresponds to a member of the extended
character set whose multibyte representation is a single byte. */
extern int wctob (wint_t __c) __THROW;
/* Determine whether PS points to an object representing the initial
state. */
extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__;
/* Write wide character representation of multibyte character pointed
to by S to PWC. */
extern size_t mbrtowc (wchar_t *__restrict __pwc,
const char *__restrict __s, size_t __n,
mbstate_t *__restrict __p) __THROW;
/* Write multibyte representation of wide character WC to S. */
extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
mbstate_t *__restrict __ps) __THROW;
/* Return number of bytes in multibyte character pointed to by S. */
extern size_t __mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) __THROW;
extern size_t mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_EXTERN_INLINES
/* Define inline function as optimization. */
/* We can use the BTOWC and WCTOB optimizations since we know that all
locales must use ASCII encoding for the values in the ASCII range
and because the wchar_t encoding is always ISO 10646. */
extern wint_t __btowc_alias (int __c) __asm ("btowc");
__extern_inline wint_t
__NTH (btowc (int __c))
{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f'
? (wint_t) __c : __btowc_alias (__c)); }
extern int __wctob_alias (wint_t __c) __asm ("wctob");
__extern_inline int
__NTH (wctob (wint_t __wc))
{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
? (int) __wc : __wctob_alias (__wc)); }
__extern_inline size_t
__NTH (mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps))
{ return (__ps != NULL
? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
#endif
# 404 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Write wide character representation of multibyte character string
SRC to DST. */
extern size_t mbsrtowcs (wchar_t *__restrict __dst,
const char **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) __THROW;
/* Write multibyte character representation of wide character string
SRC to DST. */
extern size_t wcsrtombs (char *__restrict __dst,
const wchar_t **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8
/* Write wide character representation of at most NMC bytes of the
multibyte character string SRC to DST. */
extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
const char **__restrict __src, size_t __nmc,
size_t __len, mbstate_t *__restrict __ps) __THROW;
/* Write multibyte character representation of at most NWC characters
from the wide character string SRC to DST. */
extern size_t wcsnrtombs (char *__restrict __dst,
const wchar_t **__restrict __src,
size_t __nwc, size_t __len,
mbstate_t *__restrict __ps) __THROW;
#endif /* use POSIX 2008 */
# 434 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* The following functions are extensions found in X/Open CAE. */
#ifdef __USE_XOPEN
/* Determine number of column positions required for C. */
extern int wcwidth (wchar_t __c) __THROW;
/* Determine number of column positions required for first N wide
characters (or fewer if S ends before this) in S. */
extern int wcswidth (const wchar_t *__s, size_t __n) __THROW;
#endif /* Use X/Open. */
# 445 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Convert initial portion of the wide string NPTR to `double'
representation. */
extern double wcstod (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
extern float wcstof (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
extern long double wcstold (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
__END_NAMESPACE_C99
#endif /* C99 */
# 463 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Convert initial portion of wide string NPTR to `long int'
representation. */
extern long int wcstol (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base) __THROW;
/* Convert initial portion of wide string NPTR to `unsigned long int'
representation. */
extern unsigned long int wcstoul (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
__THROW;
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Convert initial portion of wide string NPTR to `long long int'
representation. */
__extension__
extern long long int wcstoll (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
__THROW;
/* Convert initial portion of wide string NPTR to `unsigned long long int'
representation. */
__extension__
extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) __THROW;
__END_NAMESPACE_C99
#endif /* ISO C99. */
# 495 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __USE_GNU
/* Convert initial portion of wide string NPTR to `long long int'
representation. */
__extension__
extern long long int wcstoq (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
__THROW;
/* Convert initial portion of wide string NPTR to `unsigned long long int'
representation. */
__extension__
extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) __THROW;
#endif /* Use GNU. */
# 511 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __USE_GNU
/* The concept of one static locale per category is not very well
thought out. Many applications will need to process its data using
information from several different locales. Another application is
the implementation of the internationalization handling in the
upcoming ISO C++ standard library. To support this another set of
the functions using locale data exist which have an additional
argument.
Attention: all these functions are *not* standardized in any form.
This is a proof-of-concept implementation. */
/* Structure for reentrant locale using functions. This is an
(almost) opaque type for the user level programs. */
#if 0 /* expanded by -frewrite-includes */
# include <xlocale.h>
#endif /* expanded by -frewrite-includes */
# 526 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 527 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Special versions of the functions above which take the locale to
use as an additional parameter. */
extern long int wcstol_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base,
__locale_t __loc) __THROW;
extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc) __THROW;
__extension__
extern long long int wcstoll_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc) __THROW;
__extension__
extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base, __locale_t __loc)
__THROW;
extern double wcstod_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, __locale_t __loc)
__THROW;
extern float wcstof_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, __locale_t __loc)
__THROW;
extern long double wcstold_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
__locale_t __loc) __THROW;
#endif /* use GNU */
# 561 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __USE_XOPEN2K8
/* Copy SRC to DEST, returning the address of the terminating L'\0' in
DEST. */
extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src) __THROW;
/* Copy no more than N characters of SRC to DEST, returning the address of
the last character written into DEST. */
extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
__THROW;
/* Wide character I/O functions. */
/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
a wide character string. */
extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
#endif
# 582 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#if defined __USE_ISOC95 || defined __USE_UNIX98
__BEGIN_NAMESPACE_STD
/* Select orientation for stream. */
extern int fwide (__FILE *__fp, int __mode) __THROW;
/* Write formatted output to STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fwprintf (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...)
/* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
/* Write formatted output to stdout.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int wprintf (const wchar_t *__restrict __format, ...)
/* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
/* Write formatted output of at most N characters to S. */
extern int swprintf (wchar_t *__restrict __s, size_t __n,
const wchar_t *__restrict __format, ...)
__THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
/* Write formatted output to S from argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vfwprintf (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
/* Write formatted output to stdout from argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vwprintf (const wchar_t *__restrict __format,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
/* Write formatted output of at most N character to S from argument
list ARG. */
extern int vswprintf (wchar_t *__restrict __s, size_t __n,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
__THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
/* Read formatted input from STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fwscanf (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...)
/* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
/* Read formatted input from stdin.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int wscanf (const wchar_t *__restrict __format, ...)
/* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
/* Read formatted input from S. */
extern int swscanf (const wchar_t *__restrict __s,
const wchar_t *__restrict __format, ...)
__THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
# if defined __USE_ISOC99 && !defined __USE_GNU \
&& (!defined __LDBL_COMPAT || !defined __REDIRECT) \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
# ifdef __REDIRECT
/* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[
GNU extension which conflicts with valid %a followed by letter
s, S or [. */
extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...),
__isoc99_fwscanf)
/* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...),
__isoc99_wscanf)
/* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s,
const wchar_t *__restrict __format,
...), __isoc99_swscanf)
/* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
# else
# 668 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern int __isoc99_fwscanf (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...);
extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...);
extern int __isoc99_swscanf (const wchar_t *__restrict __s,
const wchar_t *__restrict __format, ...)
__THROW;
# define fwscanf __isoc99_fwscanf
# define wscanf __isoc99_wscanf
# define swscanf __isoc99_swscanf
# endif
# 678 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# endif
# 679 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__END_NAMESPACE_STD
#endif /* Use ISO C95, C99 and Unix98. */
# 682 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Read formatted input from S into argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vfwscanf (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
/* Read formatted input from stdin into argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vwscanf (const wchar_t *__restrict __format,
__gnuc_va_list __arg)
/* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
/* Read formatted input from S into argument list ARG. */
extern int vswscanf (const wchar_t *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg)
__THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
# if !defined __USE_GNU \
&& (!defined __LDBL_COMPAT || !defined __REDIRECT) \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
# ifdef __REDIRECT
extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg), __isoc99_vfwscanf)
/* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format,
__gnuc_va_list __arg), __isoc99_vwscanf)
/* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg), __isoc99_vswscanf)
/* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
# else
# 722 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
extern int __isoc99_vfwscanf (__FILE *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg);
extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
__gnuc_va_list __arg);
extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
const wchar_t *__restrict __format,
__gnuc_va_list __arg) __THROW;
# define vfwscanf __isoc99_vfwscanf
# define vwscanf __isoc99_vwscanf
# define vswscanf __isoc99_vswscanf
# endif
# 734 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# endif
# 735 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__END_NAMESPACE_C99
#endif /* Use ISO C99. */
# 738 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_STD
/* Read a character from STREAM.
These functions are possible cancellation points and therefore not
marked with __THROW. */
extern wint_t fgetwc (__FILE *__stream);
extern wint_t getwc (__FILE *__stream);
/* Read a character from stdin.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern wint_t getwchar (void);
/* Write a character to STREAM.
These functions are possible cancellation points and therefore not
marked with __THROW. */
extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
extern wint_t putwc (wchar_t __wc, __FILE *__stream);
/* Write a character to stdout.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern wint_t putwchar (wchar_t __wc);
/* Get a newline-terminated wide character string of finite length
from STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
__FILE *__restrict __stream);
/* Write a string to STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fputws (const wchar_t *__restrict __ws,
__FILE *__restrict __stream);
/* Push a character back onto the input buffer of STREAM.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
__END_NAMESPACE_STD
#ifdef __USE_GNU
/* These are defined to be equivalent to the `char' functions defined
in POSIX.1:1996.
These functions are not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation they are cancellation points and
therefore not marked with __THROW. */
extern wint_t getwc_unlocked (__FILE *__stream);
extern wint_t getwchar_unlocked (void);
/* This is the wide character version of a GNU extension.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern wint_t fgetwc_unlocked (__FILE *__stream);
/* Faster version when locking is not necessary.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
/* These are defined to be equivalent to the `char' functions defined
in POSIX.1:1996.
These functions are not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation they are cancellation points and
therefore not marked with __THROW. */
extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
extern wint_t putwchar_unlocked (wchar_t __wc);
/* This function does the same as `fgetws' but does not lock the stream.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
__FILE *__restrict __stream);
/* This function does the same as `fputws' but does not lock the stream.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int fputws_unlocked (const wchar_t *__restrict __ws,
__FILE *__restrict __stream);
#endif
# 849 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__BEGIN_NAMESPACE_C99
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE wide characters and return the number
of wide characters written, or 0 if it would exceed MAXSIZE. */
extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
const wchar_t *__restrict __format,
const struct tm *__restrict __tp) __THROW;
__END_NAMESPACE_C99
# ifdef __USE_GNU
#if 0 /* expanded by -frewrite-includes */
# include <xlocale.h>
#endif /* expanded by -frewrite-includes */
# 861 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 862 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Similar to `wcsftime' but takes the information from
the provided locale and not the global locale. */
extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
const wchar_t *__restrict __format,
const struct tm *__restrict __tp,
__locale_t __loc) __THROW;
# endif
# 870 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* The X/Open standard demands that most of the functions defined in
the <wctype.h> header must also appear here. This is probably
because some X/Open members wrote their implementation before the
ISO C standard was published and introduced the better solution.
We have to provide these definitions for compliance reasons but we
do this nonsense only if really necessary. */
#if defined __USE_UNIX98 && !defined __USE_GNU
# define __need_iswxxx
#if 0 /* expanded by -frewrite-includes */
# include <wctype.h>
#endif /* expanded by -frewrite-includes */
# 879 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 880 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 881 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Define some macros helping to catch buffer overflows. */
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
#if 0 /* expanded by -frewrite-includes */
# include <bits/wchar2.h>
#endif /* expanded by -frewrite-includes */
# 884 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 885 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 886 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#ifdef __LDBL_COMPAT
#if 0 /* expanded by -frewrite-includes */
# include <bits/wchar-ldbl.h>
#endif /* expanded by -frewrite-includes */
# 888 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
# 889 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif
# 890 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
__END_DECLS
#endif /* _WCHAR_H defined */
# 894 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
#endif /* wchar.h */
# 896 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/wchar.h" 3
/* Undefine all __need_* constants in case we are included to get those
constants but the whole file was already read. */
#undef __need_mbstate_t
#undef __need_wint_t
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 2 3
#endif
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#ifndef _GLIBCXX_CWCHAR
#define _GLIBCXX_CWCHAR 1
// Need to do a bit of trickery here with mbstate_t as char_traits
// assumes it is in wchar.h, regardless of wchar_t specializations.
#ifndef _GLIBCXX_HAVE_MBSTATE_T
extern "C"
{
typedef struct
{
int __fill[6];
} mbstate_t;
}
#endif
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
namespace std
{
using ::mbstate_t;
} // namespace std
// Get rid of those macros defined in <wchar.h> in lieu of real functions.
#undef btowc
#undef fgetwc
#undef fgetws
#undef fputwc
#undef fputws
#undef fwide
#undef fwprintf
#undef fwscanf
#undef getwc
#undef getwchar
#undef mbrlen
#undef mbrtowc
#undef mbsinit
#undef mbsrtowcs
#undef putwc
#undef putwchar
#undef swprintf
#undef swscanf
#undef ungetwc
#undef vfwprintf
#if _GLIBCXX_HAVE_VFWSCANF
# undef vfwscanf
#endif
# 91 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#undef vswprintf
#if _GLIBCXX_HAVE_VSWSCANF
# undef vswscanf
#endif
# 95 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#undef vwprintf
#if _GLIBCXX_HAVE_VWSCANF
# undef vwscanf
#endif
# 99 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#undef wcrtomb
#undef wcscat
#undef wcschr
#undef wcscmp
#undef wcscoll
#undef wcscpy
#undef wcscspn
#undef wcsftime
#undef wcslen
#undef wcsncat
#undef wcsncmp
#undef wcsncpy
#undef wcspbrk
#undef wcsrchr
#undef wcsrtombs
#undef wcsspn
#undef wcsstr
#undef wcstod
#if _GLIBCXX_HAVE_WCSTOF
# undef wcstof
#endif
# 120 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#undef wcstok
#undef wcstol
#undef wcstoul
#undef wcsxfrm
#undef wctob
#undef wmemchr
#undef wmemcmp
#undef wmemcpy
#undef wmemmove
#undef wmemset
#undef wprintf
#undef wscanf
#if _GLIBCXX_USE_WCHAR_T
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::wint_t;
using ::btowc;
using ::fgetwc;
using ::fgetws;
using ::fputwc;
using ::fputws;
using ::fwide;
using ::fwprintf;
using ::fwscanf;
using ::getwc;
using ::getwchar;
using ::mbrlen;
using ::mbrtowc;
using ::mbsinit;
using ::mbsrtowcs;
using ::putwc;
using ::putwchar;
#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
using ::swprintf;
#endif
# 160 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
using ::swscanf;
using ::ungetwc;
using ::vfwprintf;
#if _GLIBCXX_HAVE_VFWSCANF
using ::vfwscanf;
#endif
# 166 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
using ::vswprintf;
#endif
# 169 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_HAVE_VSWSCANF
using ::vswscanf;
#endif
# 172 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
using ::vwprintf;
#if _GLIBCXX_HAVE_VWSCANF
using ::vwscanf;
#endif
# 176 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
using ::wcrtomb;
using ::wcscat;
using ::wcscmp;
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
using ::wcsftime;
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
using ::wcsncpy;
using ::wcsrtombs;
using ::wcsspn;
using ::wcstod;
#if _GLIBCXX_HAVE_WCSTOF
using ::wcstof;
#endif
# 193 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
using ::wcstok;
using ::wcstol;
using ::wcstoul;
using ::wcsxfrm;
using ::wctob;
using ::wmemcmp;
using ::wmemcpy;
using ::wmemmove;
using ::wmemset;
using ::wprintf;
using ::wscanf;
using ::wcschr;
using ::wcspbrk;
using ::wcsrchr;
using ::wcsstr;
using ::wmemchr;
#ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO
inline wchar_t*
wcschr(wchar_t* __p, wchar_t __c)
{ return wcschr(const_cast<const wchar_t*>(__p), __c); }
inline wchar_t*
wcspbrk(wchar_t* __s1, const wchar_t* __s2)
{ return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
inline wchar_t*
wcsrchr(wchar_t* __p, wchar_t __c)
{ return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
inline wchar_t*
wcsstr(wchar_t* __s1, const wchar_t* __s2)
{ return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
inline wchar_t*
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
#endif
# 231 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#if _GLIBCXX_USE_C99
#undef wcstold
#undef wcstoll
#undef wcstoull
namespace __gnu_cxx
{
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" long double
(wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw ();
#endif
# 247 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if !_GLIBCXX_USE_C99_DYNAMIC
using ::wcstold;
#endif
# 250 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
extern "C" long long int
(wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
extern "C" unsigned long long int
(wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw ();
#endif
# 256 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
using ::wcstoll;
using ::wcstoull;
#endif
# 260 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
} // namespace __gnu_cxx
namespace std
{
using ::__gnu_cxx::wcstold;
using ::__gnu_cxx::wcstoll;
using ::__gnu_cxx::wcstoull;
} // namespace
#endif
# 270 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#endif //_GLIBCXX_USE_WCHAR_T
# 272 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if __cplusplus >= 201103L
#ifdef _GLIBCXX_USE_WCHAR_T
namespace std
{
#if _GLIBCXX_HAVE_WCSTOF
using std::wcstof;
#endif
# 282 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_HAVE_VFWSCANF
using std::vfwscanf;
#endif
# 285 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_HAVE_VSWSCANF
using std::vswscanf;
#endif
# 288 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_HAVE_VWSCANF
using std::vwscanf;
#endif
# 291 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#if _GLIBCXX_USE_C99
using std::wcstold;
using std::wcstoll;
using std::wcstoull;
#endif
# 297 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
} // namespace
#endif // _GLIBCXX_USE_WCHAR_T
# 300 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#endif // C++11
# 302 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
#endif
# 304 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/cwchar" 3
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 2 3
// XXX If <stdint.h> is really needed, make sure to define the macros
// before including it, in order not to break <tr1/cstdint> (and <cstdint>
// in C++0x). Reconsider all this as soon as possible...
#if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \
&& !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG))
#ifndef __STDC_LIMIT_MACROS
# define _UNDEF__STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
#endif
# 52 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
#ifndef __STDC_CONSTANT_MACROS
# define _UNDEF__STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <stdint.h> // For int64_t
#endif /* expanded by -frewrite-includes */
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
# 57 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
#ifdef _UNDEF__STDC_LIMIT_MACROS
# undef __STDC_LIMIT_MACROS
# undef _UNDEF__STDC_LIMIT_MACROS
#endif
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
#ifdef _UNDEF__STDC_CONSTANT_MACROS
# undef __STDC_CONSTANT_MACROS
# undef _UNDEF__STDC_CONSTANT_MACROS
#endif
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
#endif
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// The types streamoff, streampos and wstreampos and the class
// template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2,
// 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbiage, the
// behaviour of these types is mostly implementation defined or
// unspecified. The behaviour in this implementation is as noted
// below.
/**
* @brief Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
*
* In clauses 21.1.3.1 and 27.4.1 streamoff is described as an
* implementation defined type.
* Note: In versions of GCC up to and including GCC 3.3, streamoff
* was typedef long.
*/
#ifdef _GLIBCXX_HAVE_INT64_T_LONG
typedef long streamoff;
#elif defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)
# 90 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
typedef long long streamoff;
#elif defined(_GLIBCXX_HAVE_INT64_T)
# 92 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
typedef int64_t streamoff;
#else
# 94 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
typedef long long streamoff;
#endif
# 96 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
/// Integral type for I/O operation counts and buffer sizes.
typedef ptrdiff_t streamsize; // Signed integral type
/**
* @brief Class representing stream positions.
*
* The standard places no requirements upon the template parameter StateT.
* In this implementation StateT must be DefaultConstructible,
* CopyConstructible and Assignable. The standard only requires that fpos
* should contain a member of type StateT. In this implementation it also
* contains an offset stored as a signed integer.
*
* @param StateT Type passed to and returned from state().
*/
template<typename _StateT>
class fpos
{
private:
streamoff _M_off;
_StateT _M_state;
public:
// The standard doesn't require that fpos objects can be default
// constructed. This implementation provides a default
// constructor that initializes the offset to 0 and default
// constructs the state.
fpos()
: _M_off(0), _M_state() { }
// The standard requires that fpos objects can be constructed
// from streamoff objects using the constructor syntax, and
// fails to give any meaningful semantics. In this
// implementation implicit conversion is also allowed, and this
// constructor stores the streamoff as the offset and default
// constructs the state.
/// Construct position from offset.
fpos(streamoff __off)
: _M_off(__off), _M_state() { }
/// Convert to streamoff.
operator streamoff() const { return _M_off; }
/// Remember the value of @a st.
void
state(_StateT __st)
{ _M_state = __st; }
/// Return the last set value of @a st.
_StateT
state() const
{ return _M_state; }
// The standard requires that this operator must be defined, but
// gives no semantics. In this implementation it just adds its
// argument to the stored offset and returns *this.
/// Add offset to this position.
fpos&
operator+=(streamoff __off)
{
_M_off += __off;
return *this;
}
// The standard requires that this operator must be defined, but
// gives no semantics. In this implementation it just subtracts
// its argument from the stored offset and returns *this.
/// Subtract offset from this position.
fpos&
operator-=(streamoff __off)
{
_M_off -= __off;
return *this;
}
// The standard requires that this operator must be defined, but
// defines its semantics only in terms of operator-. In this
// implementation it constructs a copy of *this, adds the
// argument to that copy using operator+= and then returns the
// copy.
/// Add position and offset.
fpos
operator+(streamoff __off) const
{
fpos __pos(*this);
__pos += __off;
return __pos;
}
// The standard requires that this operator must be defined, but
// defines its semantics only in terms of operator+. In this
// implementation it constructs a copy of *this, subtracts the
// argument from that copy using operator-= and then returns the
// copy.
/// Subtract offset from position.
fpos
operator-(streamoff __off) const
{
fpos __pos(*this);
__pos -= __off;
return __pos;
}
// The standard requires that this operator must be defined, but
// defines its semantics only in terms of operator+. In this
// implementation it returns the difference between the offset
// stored in *this and in the argument.
/// Subtract position to return offset.
streamoff
operator-(const fpos& __other) const
{ return _M_off - __other._M_off; }
};
// The standard only requires that operator== must be an
// equivalence relation. In this implementation two fpos<StateT>
// objects belong to the same equivalence class if the contained
// offsets compare equal.
/// Test if equivalent to another position.
template<typename _StateT>
inline bool
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
{ return streamoff(__lhs) == streamoff(__rhs); }
template<typename _StateT>
inline bool
operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
{ return streamoff(__lhs) != streamoff(__rhs); }
// Clauses 21.1.3.1 and 21.1.3.2 describe streampos and wstreampos
// as implementation defined types, but clause 27.2 requires that
// they must both be typedefs for fpos<mbstate_t>
/// File position for char streams.
typedef fpos<mbstate_t> streampos;
/// File position for wchar_t streams.
typedef fpos<mbstate_t> wstreampos;
#if __cplusplus >= 201103L
/// File position for char16_t streams.
typedef fpos<mbstate_t> u16streampos;
/// File position for char32_t streams.
typedef fpos<mbstate_t> u32streampos;
#endif
# 238 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 243 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/postypes.h" 3
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup io I/O
*
* Nearly all of the I/O classes are parameterized on the type of
* characters they read and write. (The major exception is ios_base at
* the top of the hierarchy.) This is a change from pre-Standard
* streams, which were not templates.
*
* For ease of use and compatibility, all of the basic_* I/O-related
* classes are given typedef names for both of the builtin character
* widths (wide and narrow). The typedefs are the same as the
* pre-Standard names, for example:
*
* @code
* typedef basic_ifstream<char> ifstream;
* @endcode
*
* Because properly forward-declaring these classes can be difficult, you
* should not do it yourself. Instead, include the &lt;iosfwd&gt;
* header, which contains only declarations of all the I/O classes as
* well as the typedefs. Trying to forward-declare the typedefs
* themselves (e.g., <code>class ostream;</code>) is not valid ISO C++.
*
* For more specific declarations, see
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
*
* @{
*/
class ios_base;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ios;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_streambuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_istream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ostream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_iostream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringbuf;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_istringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_ostringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_filebuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ifstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ofstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_fstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class istreambuf_iterator;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator;
/// Base class for @c char streams.
typedef basic_ios<char> ios;
/// Base class for @c char buffers.
typedef basic_streambuf<char> streambuf;
/// Base class for @c char input streams.
typedef basic_istream<char> istream;
/// Base class for @c char output streams.
typedef basic_ostream<char> ostream;
/// Base class for @c char mixed input and output streams.
typedef basic_iostream<char> iostream;
/// Class for @c char memory buffers.
typedef basic_stringbuf<char> stringbuf;
/// Class for @c char input memory streams.
typedef basic_istringstream<char> istringstream;
/// Class for @c char output memory streams.
typedef basic_ostringstream<char> ostringstream;
/// Class for @c char mixed input and output memory streams.
typedef basic_stringstream<char> stringstream;
/// Class for @c char file buffers.
typedef basic_filebuf<char> filebuf;
/// Class for @c char input file streams.
typedef basic_ifstream<char> ifstream;
/// Class for @c char output file streams.
typedef basic_ofstream<char> ofstream;
/// Class for @c char mixed input and output file streams.
typedef basic_fstream<char> fstream;
#ifdef _GLIBCXX_USE_WCHAR_T
/// Base class for @c wchar_t streams.
typedef basic_ios<wchar_t> wios;
/// Base class for @c wchar_t buffers.
typedef basic_streambuf<wchar_t> wstreambuf;
/// Base class for @c wchar_t input streams.
typedef basic_istream<wchar_t> wistream;
/// Base class for @c wchar_t output streams.
typedef basic_ostream<wchar_t> wostream;
/// Base class for @c wchar_t mixed input and output streams.
typedef basic_iostream<wchar_t> wiostream;
/// Class for @c wchar_t memory buffers.
typedef basic_stringbuf<wchar_t> wstringbuf;
/// Class for @c wchar_t input memory streams.
typedef basic_istringstream<wchar_t> wistringstream;
/// Class for @c wchar_t output memory streams.
typedef basic_ostringstream<wchar_t> wostringstream;
/// Class for @c wchar_t mixed input and output memory streams.
typedef basic_stringstream<wchar_t> wstringstream;
/// Class for @c wchar_t file buffers.
typedef basic_filebuf<wchar_t> wfilebuf;
/// Class for @c wchar_t input file streams.
typedef basic_ifstream<wchar_t> wifstream;
/// Class for @c wchar_t output file streams.
typedef basic_ofstream<wchar_t> wofstream;
/// Class for @c wchar_t mixed input and output file streams.
typedef basic_fstream<wchar_t> wfstream;
#endif
# 205 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
/** @} */
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _GLIBCXX_IOSFWD */
# 211 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/iosfwd" 3
# 73 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <ext/atomicity.h>
#endif /* expanded by -frewrite-includes */
# 73 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 1 3
// Support for atomic operations -*- C++ -*-
// Copyright (C) 2004-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/atomicity.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMICITY_H
#define _GLIBCXX_ATOMICITY_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/gthr.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 1 3
/* Threads compatibility routines for libgcc2. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GLIBCXX_GCC_GTHR_H
#define _GLIBCXX_GCC_GTHR_H
#ifndef _GLIBCXX_HIDE_EXPORTS
#pragma GCC visibility push(default)
#endif
# 32 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
/* If this file is compiled with threads support, it must
#define __GTHREADS 1
to indicate that threads support is present. Also it has define
function
int __gthread_active_p ()
that returns 1 if thread system is active, 0 if not.
The threads interface must define the following types:
__gthread_key_t
__gthread_once_t
__gthread_mutex_t
__gthread_recursive_mutex_t
The threads interface must define the following macros:
__GTHREAD_ONCE_INIT
to initialize __gthread_once_t
__GTHREAD_MUTEX_INIT
to initialize __gthread_mutex_t to get a fast
non-recursive mutex.
__GTHREAD_MUTEX_INIT_FUNCTION
to initialize __gthread_mutex_t to get a fast
non-recursive mutex.
Define this to a function which looks like this:
void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
Some systems can't initialize a mutex without a
function call. Don't define __GTHREAD_MUTEX_INIT in this case.
__GTHREAD_RECURSIVE_MUTEX_INIT
__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
as above, but for a recursive mutex.
The threads interface must define the following static functions:
int __gthread_once (__gthread_once_t *once, void (*func) ())
int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
int __gthread_key_delete (__gthread_key_t key)
void *__gthread_getspecific (__gthread_key_t key)
int __gthread_setspecific (__gthread_key_t key, const void *ptr)
int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex);
int __gthread_mutex_lock (__gthread_mutex_t *mutex);
int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
The following are supported in POSIX threads only. They are required to
fix a deadlock in static initialization inside libsupc++. The header file
gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
features are supported.
Types:
__gthread_cond_t
Macros:
__GTHREAD_COND_INIT
__GTHREAD_COND_INIT_FUNCTION
Interface:
int __gthread_cond_broadcast (__gthread_cond_t *cond);
int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
__gthread_recursive_mutex_t *mutex);
All functions returning int should return zero on success or the error
number. If the operation is not supported, -1 is returned.
If the following are also defined, you should
#define __GTHREADS_CXX0X 1
to enable the c++0x thread library.
Types:
__gthread_t
__gthread_time_t
Interface:
int __gthread_create (__gthread_t *thread, void *(*func) (void*),
void *args);
int __gthread_join (__gthread_t thread, void **value_ptr);
int __gthread_detach (__gthread_t thread);
int __gthread_equal (__gthread_t t1, __gthread_t t2);
__gthread_t __gthread_self (void);
int __gthread_yield (void);
int __gthread_mutex_timedlock (__gthread_mutex_t *m,
const __gthread_time_t *abs_timeout);
int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
const __gthread_time_t *abs_time);
int __gthread_cond_signal (__gthread_cond_t *cond);
int __gthread_cond_timedwait (__gthread_cond_t *cond,
__gthread_mutex_t *mutex,
const __gthread_time_t *abs_timeout);
*/
#if __GXX_WEAK__
/* The pe-coff weak support isn't fully compatible to ELF's weak.
For static libraries it might would work, but as we need to deal
with shared versions too, we disable it for mingw-targets. */
#ifdef __MINGW32__
#undef _GLIBCXX_GTHREAD_USE_WEAK
#define _GLIBCXX_GTHREAD_USE_WEAK 0
#endif
# 143 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
#ifndef _GLIBCXX_GTHREAD_USE_WEAK
#define _GLIBCXX_GTHREAD_USE_WEAK 1
#endif
# 147 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
#endif
# 148 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/gthr-default.h>
#endif /* expanded by -frewrite-includes */
# 148 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 1 3
/* Threads compatibility routines for libgcc2 and libobjc. */
/* Compile this one with gcc. */
/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
#define _GLIBCXX_GCC_GTHR_POSIX_H
/* POSIX threads specific definitions.
Easy, since the interface is just one-to-one mapping. */
#define __GTHREADS 1
#define __GTHREADS_CXX0X 1
#if 0 /* expanded by -frewrite-includes */
#include <pthread.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 1 3
/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _PTHREAD_H
#define _PTHREAD_H 1
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 21 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <endian.h>
#endif /* expanded by -frewrite-includes */
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 1 3
/* Copyright (C) 1992-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _ENDIAN_H
#define _ENDIAN_H 1
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 21 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
/* Definitions for byte order, according to significance of bytes,
from low addresses to high addresses. The value is what you get by
putting '4' in the most significant byte, '3' in the second most
significant byte, '2' in the second least significant byte, and '1'
in the least significant byte, and then writing down one digit for
each byte, starting with the byte at the lowest address at the left,
and proceeding to the byte with the highest address at the right. */
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __PDP_ENDIAN 3412
/* This file defines `__BYTE_ORDER' for the particular machine. */
#if 0 /* expanded by -frewrite-includes */
#include <bits/endian.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/endian.h" 1 3
/* i386/x86_64 are little-endian. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/endian.h" 3
#define __BYTE_ORDER __LITTLE_ENDIAN
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 2 3
/* Some machines may need to use a different endianness for floating point
values. */
#ifndef __FLOAT_WORD_ORDER
# define __FLOAT_WORD_ORDER __BYTE_ORDER
#endif
# 43 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
#ifdef __USE_MISC
# define LITTLE_ENDIAN __LITTLE_ENDIAN
# define BIG_ENDIAN __BIG_ENDIAN
# define PDP_ENDIAN __PDP_ENDIAN
# define BYTE_ORDER __BYTE_ORDER
#endif
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
#if __BYTE_ORDER == __LITTLE_ENDIAN
# define __LONG_LONG_PAIR(HI, LO) LO, HI
#elif __BYTE_ORDER == __BIG_ENDIAN
# 54 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
# define __LONG_LONG_PAIR(HI, LO) HI, LO
#endif
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
#if defined __USE_MISC && !defined __ASSEMBLER__
/* Conversion interfaces. */
#if 0 /* expanded by -frewrite-includes */
# include <bits/byteswap.h>
#endif /* expanded by -frewrite-includes */
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 1 3
/* Macros to swap the order of bytes in integer values.
Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
#ifndef _BITS_BYTESWAP_H
#define _BITS_BYTESWAP_H 1
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 26 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 1 3
/* bits/types.h -- definitions of __*_t types underlying *_t types.
Copyright (C) 2002-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* Never include this file directly; use <sys/types.h> instead.
*/
#ifndef _BITS_TYPES_H
#define _BITS_TYPES_H 1
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 26 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/wordsize.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 1 3
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# define __WORDSIZE 32
#endif
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
#ifdef __x86_64__
# define __WORDSIZE_TIME64_COMPAT32 1
/* Both x86-64 and x32 use the 64-bit system call interface. */
# define __SYSCALL_WORDSIZE 64
#endif
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 2 3
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
/* Fixed-size types, underlying types depend on word size and compiler. */
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
#if __WORDSIZE == 64
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
#else
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#endif
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
/* quad_t is also 64 bits. */
#if __WORDSIZE == 64
typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
#else
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
#endif
# 58 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
/* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
macros for each of the OS types we define below. The definitions
of those macros must use the following macros for underlying types.
We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
variants of each of the following integer types on this machine.
16 -- "natural" 16-bit type (always short)
32 -- "natural" 32-bit type (always int)
64 -- "natural" 64-bit type (long or long long)
LONG32 -- 32-bit type, traditionally long
QUAD -- 64-bit type, always long long
WORD -- natural type of __WORDSIZE bits (int or long)
LONGWORD -- type of __WORDSIZE bits, traditionally long
We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
conventional uses of `long' or `long long' type modifiers match the
types we define, even when a less-adorned type would be the same size.
This matters for (somewhat) portably writing printf/scanf formats for
these types, where using the appropriate l or ll format modifiers can
make the typedefs and the formats match up across all GNU platforms. If
we used `long' when it's 64 bits where `long long' is expected, then the
compiler would warn about the formats not matching the argument types,
and the programmer changing them to shut up the compiler would break the
program's portability.
Here we assume what is presently the case in all the GCC configurations
we support: long long is always 64 bits, long is always word/address size,
and int is always 32 bits. */
#define __S16_TYPE short int
#define __U16_TYPE unsigned short int
#define __S32_TYPE int
#define __U32_TYPE unsigned int
#define __SLONGWORD_TYPE long int
#define __ULONGWORD_TYPE unsigned long int
#if __WORDSIZE == 32
# define __SQUAD_TYPE __quad_t
# define __UQUAD_TYPE __u_quad_t
# define __SWORD_TYPE int
# define __UWORD_TYPE unsigned int
# define __SLONG32_TYPE long int
# define __ULONG32_TYPE unsigned long int
# define __S64_TYPE __quad_t
# define __U64_TYPE __u_quad_t
/* We want __extension__ before typedef's that use nonstandard base types
such as `long long' in C89 mode. */
# define __STD_TYPE __extension__ typedef
#elif __WORDSIZE == 64
# 108 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
# define __SQUAD_TYPE long int
# define __UQUAD_TYPE unsigned long int
# define __SWORD_TYPE long int
# define __UWORD_TYPE unsigned long int
# define __SLONG32_TYPE int
# define __ULONG32_TYPE unsigned int
# define __S64_TYPE long int
# define __U64_TYPE unsigned long int
/* No need to mark the typedef with __extension__. */
# define __STD_TYPE typedef
#else
# 119 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
# error
#endif
# 121 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */
#endif /* expanded by -frewrite-includes */
# 121 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 1 3
/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
Copyright (C) 2012-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_TYPES_H
# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
#endif
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
#ifndef _BITS_TYPESIZES_H
#define _BITS_TYPESIZES_H 1
/* See <bits/types.h> for the meaning of these macros. This file exists so
that <bits/types.h> need not vary across different GNU platforms. */
/* X32 kernel interface is 64-bit. */
#if defined __x86_64__ && defined __ILP32__
# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
#else
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
#define __DEV_T_TYPE __UQUAD_TYPE
#define __UID_T_TYPE __U32_TYPE
#define __GID_T_TYPE __U32_TYPE
#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
#define __INO64_T_TYPE __UQUAD_TYPE
#define __MODE_T_TYPE __U32_TYPE
#ifdef __x86_64__
# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
#else
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
# define __NLINK_T_TYPE __UWORD_TYPE
# define __FSWORD_T_TYPE __SWORD_TYPE
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
#define __OFF64_T_TYPE __SQUAD_TYPE
#define __PID_T_TYPE __S32_TYPE
#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
#define __RLIM64_T_TYPE __UQUAD_TYPE
#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
#define __BLKCNT64_T_TYPE __SQUAD_TYPE
#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
#define __ID_T_TYPE __U32_TYPE
#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
#define __DADDR_T_TYPE __S32_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
#ifdef __x86_64__
/* Tell the libc code that off_t and off64_t are actually the same type
for all ABI purposes, even if possibly expressed as different base types
for C type-checking purposes. */
# define __OFF_T_MATCHES_OFF64_T 1
/* Same for ino_t and ino64_t. */
# define __INO_T_MATCHES_INO64_T 1
#endif
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
#endif /* bits/typesizes.h */
# 90 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/typesizes.h" 3
# 122 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 2 3
__STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */
__STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */
__STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */
__STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */
__STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/
__STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */
__STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */
__STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */
__STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */
__STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */
__STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */
__STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */
__STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */
__STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */
__STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
/* Clock ID used in clock and timer functions. */
__STD_TYPE __CLOCKID_T_TYPE __clockid_t;
/* Timer ID returned by `timer_create'. */
__STD_TYPE __TIMER_T_TYPE __timer_t;
/* Type to represent block size. */
__STD_TYPE __BLKSIZE_T_TYPE __blksize_t;
/* Types from the Large File Support interface. */
/* Type to count number of disk blocks. */
__STD_TYPE __BLKCNT_T_TYPE __blkcnt_t;
__STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t;
/* Type to count file system blocks. */
__STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t;
__STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t;
/* Type to count file system nodes. */
__STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t;
__STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t;
/* Type of miscellaneous file system fields. */
__STD_TYPE __FSWORD_T_TYPE __fsword_t;
__STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */
/* Signed long type used in system calls. */
__STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t;
/* Unsigned long type used in system calls. */
__STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t;
/* These few don't really vary by system, they always correspond
to one of the other defined types. */
typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
__STD_TYPE __SWORD_TYPE __intptr_t;
/* Duplicate info from sys/socket.h. */
__STD_TYPE __U32_TYPE __socklen_t;
#undef __STD_TYPE
#endif /* bits/types.h */
# 195 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/types.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/wordsize.h>
#endif /* expanded by -frewrite-includes */
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 1 3
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# define __WORDSIZE 32
#endif
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
#ifdef __x86_64__
# define __WORDSIZE_TIME64_COMPAT32 1
/* Both x86-64 and x32 use the 64-bit system call interface. */
# define __SYSCALL_WORDSIZE 64
#endif
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# 29 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 2 3
/* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \
((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
/* Get __bswap_16. */
#if 0 /* expanded by -frewrite-includes */
#include <bits/byteswap-16.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap-16.h" 1 3
/* Macros to swap the order of bytes in 16-bit integer values.
Copyright (C) 2012-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_BYTESWAP_H
# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
#endif
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap-16.h" 3
#ifdef __GNUC__
# if __GNUC__ >= 2
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __v, __x = (unsigned short int) (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_16 (__x); \
else \
__asm__ ("rorw $8, %w0" \
: "=r" (__v) \
: "0" (__x) \
: "cc"); \
__v; }))
# else
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap-16.h" 3
/* This is better than nothing. */
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __x = (unsigned short int) (x); \
__bswap_constant_16 (__x); }))
# endif
# 43 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap-16.h" 3
#else
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap-16.h" 3
static __inline unsigned short int
__bswap_16 (unsigned short int __bsx)
{
return __bswap_constant_16 (__bsx);
}
#endif
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap-16.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 2 3
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
#ifdef __GNUC__
# if __GNUC_PREREQ (4, 3)
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return __builtin_bswap32 (__bsx);
}
# elif __GNUC__ >= 2
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \
|| defined __pentiumpro__ || defined __pentium4__ \
|| defined __k8__ || defined __athlon__ \
|| defined __k6__ || defined __nocona__ \
|| defined __core2__ || defined __geode__ \
|| defined __amdfam10__)
/* To swap the bytes in a word the i486 processors and up provide the
`bswap' opcode. On i386 we have to use three instructions. */
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_32 (__x); \
else \
__asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); \
__v; }))
# else
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_32 (__x); \
else \
__asm__ ("rorw $8, %w0;" \
"rorl $16, %0;" \
"rorw $8, %w0" \
: "=r" (__v) \
: "0" (__x) \
: "cc"); \
__v; }))
# endif
# 81 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# else
# 82 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __x = (x); __bswap_constant_32 (__x); }))
# endif
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
#else
# 87 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return __bswap_constant_32 (__bsx);
}
#endif
# 93 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
#if __GNUC_PREREQ (2, 0)
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
| (((x) & 0x000000ff00000000ull) >> 8) \
| (((x) & 0x00000000ff000000ull) << 8) \
| (((x) & 0x0000000000ff0000ull) << 24) \
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56)))
# if __GNUC_PREREQ (4, 3)
static __inline __uint64_t
__bswap_64 (__uint64_t __bsx)
{
return __builtin_bswap64 (__bsx);
}
# elif __WORDSIZE == 64
# 114 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# define __bswap_64(x) \
(__extension__ \
({ __uint64_t __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_64 (__x); \
else \
__asm__ ("bswap %q0" : "=r" (__v) : "0" (__x)); \
__v; }))
# else
# 123 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ __uint64_t __ll; \
unsigned int __l[2]; } __w, __r; \
if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
else \
{ \
__w.__ll = (x); \
__r.__l[0] = __bswap_32 (__w.__l[1]); \
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
# endif
# 137 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
#else
# 138 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# define __bswap_constant_64(x) \
((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
| (((x) & 0x000000ff00000000ull) >> 8) \
| (((x) & 0x00000000ff000000ull) << 8) \
| (((x) & 0x0000000000ff0000ull) << 24) \
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56))
static __inline __uint64_t
__bswap_64 (__uint64_t __bsx)
{
return __bswap_constant_64 (__bsx);
}
#endif
# 154 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
#endif /* _BITS_BYTESWAP_H */
# 156 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/byteswap.h" 3
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 2 3
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define htobe16(x) __bswap_16 (x)
# define htole16(x) (x)
# define be16toh(x) __bswap_16 (x)
# define le16toh(x) (x)
# define htobe32(x) __bswap_32 (x)
# define htole32(x) (x)
# define be32toh(x) __bswap_32 (x)
# define le32toh(x) (x)
# define htobe64(x) __bswap_64 (x)
# define htole64(x) (x)
# define be64toh(x) __bswap_64 (x)
# define le64toh(x) (x)
# else
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
# define htobe16(x) (x)
# define htole16(x) __bswap_16 (x)
# define be16toh(x) (x)
# define le16toh(x) __bswap_16 (x)
# define htobe32(x) (x)
# define htole32(x) __bswap_32 (x)
# define be32toh(x) (x)
# define le32toh(x) __bswap_32 (x)
# define htobe64(x) (x)
# define htole64(x) __bswap_64 (x)
# define be64toh(x) (x)
# define le64toh(x) __bswap_64 (x)
# endif
# 94 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
#endif
# 95 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
#endif /* endian.h */
# 97 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/endian.h" 3
# 23 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <sched.h>
#endif /* expanded by -frewrite-includes */
# 23 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 1 3
/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
Copyright (C) 1996-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _SCHED_H
#define _SCHED_H 1
#if 0 /* expanded by -frewrite-includes */
#include <features.h>
#endif /* expanded by -frewrite-includes */
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
# 23 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
/* Get type definitions. */
#if 0 /* expanded by -frewrite-includes */
#include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 25 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
# 26 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
#define __need_size_t
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 1 3
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 90 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 93 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# define NULL 0
# endif
# 104 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#else
# 105 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# define NULL ((void*)0)
#endif
# 107 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# 119 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 120 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 138 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# 29 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 2 3
#ifdef __USE_XOPEN2K
# define __need_time_t
# define __need_timespec
#endif
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <time.h>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 1 3
/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* ISO C99 Standard: 7.23 Date and time <time.h>
*/
#ifndef _TIME_H
#if (! defined __need_time_t && !defined __need_clock_t && \
! defined __need_timespec)
# define _TIME_H 1
#if 0 /* expanded by -frewrite-includes */
# include <features.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_DECLS
#endif
# 32 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#ifdef _TIME_H
/* Get size_t and NULL from <stddef.h>. */
# define __need_size_t
# define __need_NULL
#if 0 /* expanded by -frewrite-includes */
# include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* This defines CLOCKS_PER_SEC, which is the number of processor clock
ticks per second. */
#if 0 /* expanded by -frewrite-includes */
# include <bits/time.h>
#endif /* expanded by -frewrite-includes */
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 42 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* This is the obsolete POSIX.1-1988 name for the same constant. */
# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
# ifndef CLK_TCK
# define CLK_TCK CLOCKS_PER_SEC
# endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# endif
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* <time.h> included. */
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t)
# define __clock_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Returned by `clock'. */
typedef __clock_t clock_t;
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX
__USING_NAMESPACE_STD(clock_t)
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* clock_t not defined and <time.h> or need clock_t. */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_clock_t
#if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t)
# define __time_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Returned by `time'. */
typedef __time_t time_t;
__END_NAMESPACE_STD
#ifdef __USE_POSIX
__USING_NAMESPACE_STD(time_t)
#endif
# 80 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* time_t not defined and <time.h> or need time_t. */
# 82 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_time_t
#if !defined __clockid_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t)
# define __clockid_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 88 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Clock ID used in clock and timer functions. */
typedef __clockid_t clockid_t;
#endif /* clockid_t not defined and <time.h> or need clockid_t. */
# 94 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __clockid_time_t
#if !defined __timer_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t)
# define __timer_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 100 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 101 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Timer ID returned by `timer_create'. */
typedef __timer_t timer_t;
#endif /* timer_t not defined and <time.h> or need timer_t. */
# 106 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_timer_t
#if (!defined __timespec_defined \
&& ((defined _TIME_H \
&& (defined __USE_POSIX199309 \
|| defined __USE_ISOC11)) \
|| defined __need_timespec))
# define __timespec_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h> /* This defines __time_t for us. */
#endif /* expanded by -frewrite-includes */
# 116 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 117 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* POSIX.1b structure for a time value. This is like a `struct timeval' but
has nanoseconds instead of microseconds. */
struct timespec
{
__time_t tv_sec; /* Seconds. */
__syscall_slong_t tv_nsec; /* Nanoseconds. */
};
#endif /* timespec not defined and <time.h> or need timespec. */
# 127 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_timespec
#ifdef _TIME_H
__BEGIN_NAMESPACE_STD
/* Used by other time functions. */
struct tm
{
int tm_sec; /* Seconds. [0-60] (1 leap second) */
int tm_min; /* Minutes. [0-59] */
int tm_hour; /* Hours. [0-23] */
int tm_mday; /* Day. [1-31] */
int tm_mon; /* Month. [0-11] */
int tm_year; /* Year - 1900. */
int tm_wday; /* Day of week. [0-6] */
int tm_yday; /* Days in year.[0-365] */
int tm_isdst; /* DST. [-1/0/1]*/
# ifdef __USE_MISC
long int tm_gmtoff; /* Seconds east of UTC. */
const char *tm_zone; /* Timezone abbreviation. */
# else
# 149 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
long int __tm_gmtoff; /* Seconds east of UTC. */
const char *__tm_zone; /* Timezone abbreviation. */
# endif
# 152 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
};
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX
__USING_NAMESPACE_STD(tm)
#endif
# 157 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_POSIX199309
/* POSIX.1b structure for timer start values and intervals. */
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
/* We can use a simple forward declaration. */
struct sigevent;
# endif /* POSIX.1b */
# 171 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_XOPEN2K
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
# endif
# 177 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# endif
# 178 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_ISOC11
/* Time base values for timespec_get. */
# define TIME_UTC 1
# endif
# 184 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Time used by the program so far (user time + system time).
The result / CLOCKS_PER_SECOND is program time in seconds. */
extern clock_t clock (void) __THROW;
/* Return the current time and put it in *TIMER if TIMER is not NULL. */
extern time_t time (time_t *__timer) __THROW;
/* Return the difference between TIME1 and TIME0. */
extern double difftime (time_t __time1, time_t __time0)
__THROW __attribute__ ((__const__));
/* Return the `time_t' representation of TP and normalize TP. */
extern time_t mktime (struct tm *__tp) __THROW;
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE characters and return the number
of characters written, or 0 if it would exceed MAXSIZE. */
extern size_t strftime (char *__restrict __s, size_t __maxsize,
const char *__restrict __format,
const struct tm *__restrict __tp) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_XOPEN
/* Parse S according to FORMAT and store binary time information in TP.
The return value is a pointer to the first unparsed character in S. */
extern char *strptime (const char *__restrict __s,
const char *__restrict __fmt, struct tm *__tp)
__THROW;
# endif
# 217 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_XOPEN2K8
/* Similar to the two functions above but take the information from
the provided locale and not the global locale. */
#if 0 /* expanded by -frewrite-includes */
# include <xlocale.h>
#endif /* expanded by -frewrite-includes */
# 221 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 222 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
const char *__restrict __format,
const struct tm *__restrict __tp,
__locale_t __loc) __THROW;
# endif
# 228 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_GNU
extern char *strptime_l (const char *__restrict __s,
const char *__restrict __fmt, struct tm *__tp,
__locale_t __loc) __THROW;
# endif
# 234 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Return the `struct tm' representation of *TIMER
in Universal Coordinated Time (aka Greenwich Mean Time). */
extern struct tm *gmtime (const time_t *__timer) __THROW;
/* Return the `struct tm' representation
of *TIMER in the local timezone. */
extern struct tm *localtime (const time_t *__timer) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_POSIX
/* Return the `struct tm' representation of *TIMER in UTC,
using *TP to store the result. */
extern struct tm *gmtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
/* Return the `struct tm' representation of *TIMER in local time,
using *TP to store the result. */
extern struct tm *localtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
# endif /* POSIX */
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
extern char *asctime (const struct tm *__tp) __THROW;
/* Equivalent to `asctime (localtime (timer))'. */
extern char *ctime (const time_t *__timer) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_POSIX
/* Reentrant versions of the above functions. */
/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
extern char *asctime_r (const struct tm *__restrict __tp,
char *__restrict __buf) __THROW;
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
extern char *ctime_r (const time_t *__restrict __timer,
char *__restrict __buf) __THROW;
# endif /* POSIX */
# 279 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Defined in localtime.c. */
extern char *__tzname[2]; /* Current timezone names. */
extern int __daylight; /* If daylight-saving time is ever in use. */
extern long int __timezone; /* Seconds west of UTC. */
# ifdef __USE_POSIX
/* Same as above. */
extern char *tzname[2];
/* Set time conversion information from the TZ environment variable.
If TZ is not defined, a locale-dependent default is used. */
extern void tzset (void) __THROW;
# endif
# 295 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# if defined __USE_MISC || defined __USE_XOPEN
extern int daylight;
extern long int timezone;
# endif
# 300 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_MISC
/* Set the system time to *WHEN.
This call is restricted to the superuser. */
extern int stime (const time_t *__when) __THROW;
# endif
# 306 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Nonzero if YEAR is a leap year (every 4 years,
except every 100th isn't, and every 400th is). */
# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
# ifdef __USE_MISC
/* Miscellaneous functions many Unices inherited from the public domain
localtime package. These are included only for compatibility. */
/* Like `mktime', but for TP represents Universal Time, not local time. */
extern time_t timegm (struct tm *__tp) __THROW;
/* Another name for `mktime'. */
extern time_t timelocal (struct tm *__tp) __THROW;
/* Return the number of days in YEAR. */
extern int dysize (int __year) __THROW __attribute__ ((__const__));
# endif
# 327 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_POSIX199309
/* Pause execution for a number of nanoseconds.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int nanosleep (const struct timespec *__requested_time,
struct timespec *__remaining);
/* Get resolution of clock CLOCK_ID. */
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
/* Get current value of clock CLOCK_ID and store it in TP. */
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
/* Set clock CLOCK_ID to value TP. */
extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
__THROW;
# ifdef __USE_XOPEN2K
/* High-resolution sleep with the specified clock.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
const struct timespec *__req,
struct timespec *__rem);
/* Return clock ID for CPU-time clock. */
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
# endif
# 360 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Create new per-process timer using CLOCK_ID. */
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) __THROW;
/* Delete timer TIMERID. */
extern int timer_delete (timer_t __timerid) __THROW;
/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
extern int timer_settime (timer_t __timerid, int __flags,
const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) __THROW;
/* Get current value of timer TIMERID and store it in VALUE. */
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
__THROW;
/* Get expiration overrun for timer TIMERID. */
extern int timer_getoverrun (timer_t __timerid) __THROW;
# endif
# 382 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_ISOC11
/* Set TS to calendar time based in time base BASE. */
extern int timespec_get (struct timespec *__ts, int __base)
__THROW __nonnull ((1));
# endif
# 389 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_XOPEN_EXTENDED
/* Set to one of the following values to indicate an error.
1 the DATEMSK environment variable is null or undefined,
2 the template file cannot be opened for reading,
3 failed to get file status information,
4 the template file is not a regular file,
5 an error is encountered while reading the template file,
6 memory allication failed (not enough memory available),
7 there is no line in the template that matches the input,
8 invalid input specification Example: February 31 or a time is
specified that can not be represented in a time_t (representing
the time in seconds since 00:00:00 UTC, January 1, 1970) */
extern int getdate_err;
/* Parse the given string as a date specification and return a value
representing the value. The templates from the file identified by
the environment variable DATEMSK are used. In case of an error
`getdate_err' is set.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern struct tm *getdate (const char *__string);
# endif
# 414 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_GNU
/* Since `getdate' is not reentrant because of the use of `getdate_err'
and the static buffer to return the result in, we provide a thread-safe
variant. The functionality is the same. The result is returned in
the buffer pointed to by RESBUFP and in case of an error the return
value is != 0 with the same values as given above for `getdate_err'.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int getdate_r (const char *__restrict __string,
struct tm *__restrict __resbufp);
# endif
# 429 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__END_DECLS
#endif /* <time.h> included. */
# 433 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* <time.h> not already included. */
# 435 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 2 3
#ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
#endif
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
/* Get system specific constant and data structure definitions. */
#if 0 /* expanded by -frewrite-includes */
#include <bits/sched.h>
#endif /* expanded by -frewrite-includes */
# 43 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 1 3
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
Copyright (C) 1996-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef __need_schedparam
#ifndef _SCHED_H
# error "Never include <bits/sched.h> directly; use <sched.h> instead."
#endif
# 25 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
/* Scheduling algorithms. */
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
#ifdef __USE_GNU
# define SCHED_BATCH 3
# define SCHED_IDLE 5
# define SCHED_RESET_ON_FORK 0x40000000
#endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
#ifdef __USE_GNU
/* Cloning flags. */
# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */
# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */
# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */
# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */
# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */
# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */
# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to
wake it up on mm_release. */
# define CLONE_PARENT 0x00008000 /* Set if we want to have the same
parent as the cloner. */
# define CLONE_THREAD 0x00010000 /* Set to add to same thread group. */
# define CLONE_NEWNS 0x00020000 /* Set to create new namespace. */
# define CLONE_SYSVSEM 0x00040000 /* Set to shared SVID SEM_UNDO semantics. */
# define CLONE_SETTLS 0x00080000 /* Set TLS info. */
# define CLONE_PARENT_SETTID 0x00100000 /* Store TID in userlevel buffer
before MM copy. */
# define CLONE_CHILD_CLEARTID 0x00200000 /* Register exit futex and memory
location to clear. */
# define CLONE_DETACHED 0x00400000 /* Create clone detached. */
# define CLONE_UNTRACED 0x00800000 /* Set if the tracing process can't
force CLONE_PTRACE on this clone. */
# define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in
the child. */
# define CLONE_NEWUTS 0x04000000 /* New utsname group. */
# define CLONE_NEWIPC 0x08000000 /* New ipcs. */
# define CLONE_NEWUSER 0x10000000 /* New user namespace. */
# define CLONE_NEWPID 0x20000000 /* New pid namespace. */
# define CLONE_NEWNET 0x40000000 /* New network namespace. */
# define CLONE_IO 0x80000000 /* Clone I/O context. */
#endif
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
/* The official definition. */
struct sched_param
{
int __sched_priority;
};
__BEGIN_DECLS
#ifdef __USE_GNU
/* Clone current process. */
extern int clone (int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg, ...) __THROW;
/* Unshare the specified resources. */
extern int unshare (int __flags) __THROW;
/* Get index of currently used CPU. */
extern int sched_getcpu (void) __THROW;
/* Switch process to namespace of type NSTYPE indicated by FD. */
extern int setns (int __fd, int __nstype) __THROW;
#endif
# 93 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
__END_DECLS
#endif /* need schedparam */
# 98 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
#if !defined __defined_schedparam \
&& (defined __need_schedparam || defined _SCHED_H)
# define __defined_schedparam 1
/* Data structure to describe a process' schedulability. */
struct __sched_param
{
int __sched_priority;
};
# undef __need_schedparam
#endif
# 109 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
#if defined _SCHED_H && !defined __cpu_set_t_defined
# define __cpu_set_t_defined
/* Size definition for CPU sets. */
# define __CPU_SETSIZE 1024
# define __NCPUBITS (8 * sizeof (__cpu_mask))
/* Type for array elements in 'cpu_set_t'. */
typedef unsigned long int __cpu_mask;
/* Basic access functions. */
# define __CPUELT(cpu) ((cpu) / __NCPUBITS)
# define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
/* Data structure to describe CPU mask. */
typedef struct
{
__cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
} cpu_set_t;
/* Access functions for CPU masks. */
# if __GNUC_PREREQ (2, 91)
# define __CPU_ZERO_S(setsize, cpusetp) \
do __builtin_memset (cpusetp, '\0', setsize); while (0)
# else
# 135 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
# define __CPU_ZERO_S(setsize, cpusetp) \
do { \
size_t __i; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
__cpu_mask *__bits = (cpusetp)->__bits; \
for (__i = 0; __i < __imax; ++__i) \
__bits[__i] = 0; \
} while (0)
# endif
# 144 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
# define __CPU_SET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|= __CPUMASK (__cpu)) \
: 0; }))
# define __CPU_CLR_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
&= ~__CPUMASK (__cpu)) \
: 0; }))
# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
# define __CPU_COUNT_S(setsize, cpusetp) \
__sched_cpucount (setsize, cpusetp)
# if __GNUC_PREREQ (2, 91)
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
# else
# 173 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__extension__ \
({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
if (__arr1[__i] != __arr2[__i]) \
break; \
__i == __imax; }))
# endif
# 184 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
(__extension__ \
({ cpu_set_t *__dest = (destset); \
const __cpu_mask *__arr1 = (srcset1)->__bits; \
const __cpu_mask *__arr2 = (srcset2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \
__dest; }))
# define __CPU_ALLOC_SIZE(count) \
((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
# define __CPU_ALLOC(count) __sched_cpualloc (count)
# define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
__BEGIN_DECLS
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
__THROW;
extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
extern void __sched_cpufree (cpu_set_t *__set) __THROW;
__END_DECLS
#endif
# 211 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/sched.h" 3
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 2 3
/* Define the real names for the elements of `struct sched_param'. */
#define sched_priority __sched_priority
__BEGIN_DECLS
/* Set scheduling parameters for a process. */
extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
__THROW;
/* Retrieve scheduling parameters for a particular process. */
extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
/* Set scheduling algorithm and/or parameters for a process. */
extern int sched_setscheduler (__pid_t __pid, int __policy,
const struct sched_param *__param) __THROW;
/* Retrieve scheduling algorithm for a particular purpose. */
extern int sched_getscheduler (__pid_t __pid) __THROW;
/* Yield the processor. */
extern int sched_yield (void) __THROW;
/* Get maximum priority value for a scheduler. */
extern int sched_get_priority_max (int __algorithm) __THROW;
/* Get minimum priority value for a scheduler. */
extern int sched_get_priority_min (int __algorithm) __THROW;
/* Get the SCHED_RR interval for the named process. */
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
#ifdef __USE_GNU
/* Access macros for `cpu_set'. */
# define CPU_SETSIZE __CPU_SETSIZE
# define CPU_SET(cpu, cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
# define CPU_CLR(cpu, cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
# define CPU_ISSET(cpu, cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), \
cpusetp)
# define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
# define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
# define CPU_SET_S(cpu, setsize, cpusetp) __CPU_SET_S (cpu, setsize, cpusetp)
# define CPU_CLR_S(cpu, setsize, cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp)
# define CPU_ISSET_S(cpu, setsize, cpusetp) __CPU_ISSET_S (cpu, setsize, \
cpusetp)
# define CPU_ZERO_S(setsize, cpusetp) __CPU_ZERO_S (setsize, cpusetp)
# define CPU_COUNT_S(setsize, cpusetp) __CPU_COUNT_S (setsize, cpusetp)
# define CPU_EQUAL(cpusetp1, cpusetp2) \
__CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
# define CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
__CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
# define CPU_AND(destset, srcset1, srcset2) \
__CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
# define CPU_OR(destset, srcset1, srcset2) \
__CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
# define CPU_XOR(destset, srcset1, srcset2) \
__CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
# define CPU_AND_S(setsize, destset, srcset1, srcset2) \
__CPU_OP_S (setsize, destset, srcset1, srcset2, &)
# define CPU_OR_S(setsize, destset, srcset1, srcset2) \
__CPU_OP_S (setsize, destset, srcset1, srcset2, |)
# define CPU_XOR_S(setsize, destset, srcset1, srcset2) \
__CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
# define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
# define CPU_ALLOC(count) __CPU_ALLOC (count)
# define CPU_FREE(cpuset) __CPU_FREE (cpuset)
/* Set the CPU affinity for a task */
extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
const cpu_set_t *__cpuset) __THROW;
/* Get the CPU affinity for a task */
extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
cpu_set_t *__cpuset) __THROW;
#endif
# 125 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
__END_DECLS
#endif /* sched.h */
# 129 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/sched.h" 3
# 24 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <time.h>
#endif /* expanded by -frewrite-includes */
# 24 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 1 3
/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* ISO C99 Standard: 7.23 Date and time <time.h>
*/
#ifndef _TIME_H
#if (! defined __need_time_t && !defined __need_clock_t && \
! defined __need_timespec)
# define _TIME_H 1
#if 0 /* expanded by -frewrite-includes */
# include <features.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_DECLS
#endif
# 32 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#ifdef _TIME_H
/* Get size_t and NULL from <stddef.h>. */
# define __need_size_t
# define __need_NULL
#if 0 /* expanded by -frewrite-includes */
# include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 1 3
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 90 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 93 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# define NULL 0
# endif
# 104 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#else
# 105 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# define NULL ((void*)0)
#endif
# 107 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# 119 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 120 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
#endif
# 138 "third-party-buck/gcc-4.9-glibc-2.20-fb/tools/llvm-fb/lib/clang/stable/include/stddef.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 2 3
/* This defines CLOCKS_PER_SEC, which is the number of processor clock
ticks per second. */
#if 0 /* expanded by -frewrite-includes */
# include <bits/time.h>
#endif /* expanded by -frewrite-includes */
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 1 3
/* System-dependent timing definitions. Linux version.
Copyright (C) 1996-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* Never include this file directly; use <time.h> instead.
*/
#if defined __need_timeval || defined __USE_GNU
# ifndef _STRUCT_TIMEVAL
# define _STRUCT_TIMEVAL 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 26 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
struct timeval
{
__time_t tv_sec; /* Seconds. */
__suseconds_t tv_usec; /* Microseconds. */
};
# endif /* struct timeval */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
#endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
#ifndef __need_timeval
# ifndef _BITS_TIME_H
# define _BITS_TIME_H 1
/* ISO/IEC 9899:1990 7.12.1: <time.h>
The macro `CLOCKS_PER_SEC' is the number per second of the value
returned by the `clock' function. */
/* CAE XSH, Issue 4, Version 2: <time.h>
The value of CLOCKS_PER_SEC is required to be 1 million on all
XSI-conformant systems. */
# define CLOCKS_PER_SEC 1000000l
# if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \
&& !defined __USE_XOPEN2K
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 54 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
extern long int __sysconf (int);
# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
# endif
# 58 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
# ifdef __USE_POSIX199309
/* Identifier for system-wide realtime clock. */
# define CLOCK_REALTIME 0
/* Monotonic system-wide clock. */
# define CLOCK_MONOTONIC 1
/* High-resolution timer from the CPU. */
# define CLOCK_PROCESS_CPUTIME_ID 2
/* Thread-specific CPU-time clock. */
# define CLOCK_THREAD_CPUTIME_ID 3
/* Monotonic system-wide clock, not adjusted for frequency scaling. */
# define CLOCK_MONOTONIC_RAW 4
/* Identifier for system-wide realtime clock, updated only on ticks. */
# define CLOCK_REALTIME_COARSE 5
/* Monotonic system-wide clock, updated only on ticks. */
# define CLOCK_MONOTONIC_COARSE 6
/* Monotonic system-wide clock that includes time spent in suspension. */
# define CLOCK_BOOTTIME 7
/* Like CLOCK_REALTIME but also wakes suspended system. */
# define CLOCK_REALTIME_ALARM 8
/* Like CLOCK_BOOTTIME but also wakes suspended system. */
# define CLOCK_BOOTTIME_ALARM 9
/* Flag to indicate time is absolute. */
# define TIMER_ABSTIME 1
# endif
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
# ifdef __USE_GNU
#if 0 /* expanded by -frewrite-includes */
# include <bits/timex.h>
#endif /* expanded by -frewrite-includes */
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/timex.h" 1 3
/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_TIMEX_H
#define _BITS_TIMEX_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 21 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/timex.h" 3
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/timex.h" 3
/* These definitions from linux/timex.h as of 2.6.30. */
struct timex
{
unsigned int modes; /* mode selector */
__syscall_slong_t offset; /* time offset (usec) */
__syscall_slong_t freq; /* frequency offset (scaled ppm) */
__syscall_slong_t maxerror; /* maximum error (usec) */
__syscall_slong_t esterror; /* estimated error (usec) */
int status; /* clock command/status */
__syscall_slong_t constant; /* pll time constant */
__syscall_slong_t precision; /* clock precision (usec) (ro) */
__syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */
struct timeval time; /* (read only) */
__syscall_slong_t tick; /* (modified) usecs between clock ticks */
__syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */
__syscall_slong_t jitter; /* pps jitter (us) (ro) */
int shift; /* interval duration (s) (shift) (ro) */
__syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */
__syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */
__syscall_slong_t calcnt; /* calibration intervals (ro) */
__syscall_slong_t errcnt; /* calibration errors (ro) */
__syscall_slong_t stbcnt; /* stability limit exceeded (ro) */
int tai; /* TAI offset (ro) */
/* ??? */
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32;
};
/* Mode codes (timex.mode) */
#define ADJ_OFFSET 0x0001 /* time offset */
#define ADJ_FREQUENCY 0x0002 /* frequency offset */
#define ADJ_MAXERROR 0x0004 /* maximum time error */
#define ADJ_ESTERROR 0x0008 /* estimated time error */
#define ADJ_STATUS 0x0010 /* clock status */
#define ADJ_TIMECONST 0x0020 /* pll time constant */
#define ADJ_TAI 0x0080 /* set TAI offset */
#define ADJ_MICRO 0x1000 /* select microsecond resolution */
#define ADJ_NANO 0x2000 /* select nanosecond resolution */
#define ADJ_TICK 0x4000 /* tick value */
#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
/* xntp 3.4 compatibility names */
#define MOD_OFFSET ADJ_OFFSET
#define MOD_FREQUENCY ADJ_FREQUENCY
#define MOD_MAXERROR ADJ_MAXERROR
#define MOD_ESTERROR ADJ_ESTERROR
#define MOD_STATUS ADJ_STATUS
#define MOD_TIMECONST ADJ_TIMECONST
#define MOD_CLKB ADJ_TICK
#define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */
#define MOD_TAI ADJ_TAI
#define MOD_MICRO ADJ_MICRO
#define MOD_NANO ADJ_NANO
/* Status codes (timex.status) */
#define STA_PLL 0x0001 /* enable PLL updates (rw) */
#define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */
#define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */
#define STA_FLL 0x0008 /* select frequency-lock mode (rw) */
#define STA_INS 0x0010 /* insert leap (rw) */
#define STA_DEL 0x0020 /* delete leap (rw) */
#define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */
#define STA_FREQHOLD 0x0080 /* hold frequency (rw) */
#define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */
#define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */
#define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */
#define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */
#define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */
#define STA_NANO 0x2000 /* resolution (0 = us, 1 = ns) (ro) */
#define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */
#define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */
/* Read-only bits */
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
#endif /* bits/timex.h */
# 109 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/timex.h" 3
# 87 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 2 3
__BEGIN_DECLS
/* Tune a POSIX clock. */
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
__END_DECLS
# endif /* use GNU */
# 95 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
# endif /* bits/time.h */
# 97 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
#endif
# 98 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/time.h" 3
#undef __need_timeval
# 42 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 2 3
/* This is the obsolete POSIX.1-1988 name for the same constant. */
# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
# ifndef CLK_TCK
# define CLK_TCK CLOCKS_PER_SEC
# endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# endif
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* <time.h> included. */
# 51 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t)
# define __clock_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Returned by `clock'. */
typedef __clock_t clock_t;
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX
__USING_NAMESPACE_STD(clock_t)
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* clock_t not defined and <time.h> or need clock_t. */
# 66 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_clock_t
#if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t)
# define __time_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Returned by `time'. */
typedef __time_t time_t;
__END_NAMESPACE_STD
#ifdef __USE_POSIX
__USING_NAMESPACE_STD(time_t)
#endif
# 80 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* time_t not defined and <time.h> or need time_t. */
# 82 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_time_t
#if !defined __clockid_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t)
# define __clockid_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 88 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Clock ID used in clock and timer functions. */
typedef __clockid_t clockid_t;
#endif /* clockid_t not defined and <time.h> or need clockid_t. */
# 94 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __clockid_time_t
#if !defined __timer_t_defined && \
((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t)
# define __timer_t_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h>
#endif /* expanded by -frewrite-includes */
# 100 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 101 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Timer ID returned by `timer_create'. */
typedef __timer_t timer_t;
#endif /* timer_t not defined and <time.h> or need timer_t. */
# 106 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_timer_t
#if (!defined __timespec_defined \
&& ((defined _TIME_H \
&& (defined __USE_POSIX199309 \
|| defined __USE_ISOC11)) \
|| defined __need_timespec))
# define __timespec_defined 1
#if 0 /* expanded by -frewrite-includes */
# include <bits/types.h> /* This defines __time_t for us. */
#endif /* expanded by -frewrite-includes */
# 116 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 117 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* POSIX.1b structure for a time value. This is like a `struct timeval' but
has nanoseconds instead of microseconds. */
struct timespec
{
__time_t tv_sec; /* Seconds. */
__syscall_slong_t tv_nsec; /* Nanoseconds. */
};
#endif /* timespec not defined and <time.h> or need timespec. */
# 127 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#undef __need_timespec
#ifdef _TIME_H
__BEGIN_NAMESPACE_STD
/* Used by other time functions. */
struct tm
{
int tm_sec; /* Seconds. [0-60] (1 leap second) */
int tm_min; /* Minutes. [0-59] */
int tm_hour; /* Hours. [0-23] */
int tm_mday; /* Day. [1-31] */
int tm_mon; /* Month. [0-11] */
int tm_year; /* Year - 1900. */
int tm_wday; /* Day of week. [0-6] */
int tm_yday; /* Days in year.[0-365] */
int tm_isdst; /* DST. [-1/0/1]*/
# ifdef __USE_MISC
long int tm_gmtoff; /* Seconds east of UTC. */
const char *tm_zone; /* Timezone abbreviation. */
# else
# 149 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
long int __tm_gmtoff; /* Seconds east of UTC. */
const char *__tm_zone; /* Timezone abbreviation. */
# endif
# 152 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
};
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX
__USING_NAMESPACE_STD(tm)
#endif
# 157 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_POSIX199309
/* POSIX.1b structure for timer start values and intervals. */
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
/* We can use a simple forward declaration. */
struct sigevent;
# endif /* POSIX.1b */
# 171 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_XOPEN2K
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
# endif
# 177 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# endif
# 178 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_ISOC11
/* Time base values for timespec_get. */
# define TIME_UTC 1
# endif
# 184 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Time used by the program so far (user time + system time).
The result / CLOCKS_PER_SECOND is program time in seconds. */
extern clock_t clock (void) __THROW;
/* Return the current time and put it in *TIMER if TIMER is not NULL. */
extern time_t time (time_t *__timer) __THROW;
/* Return the difference between TIME1 and TIME0. */
extern double difftime (time_t __time1, time_t __time0)
__THROW __attribute__ ((__const__));
/* Return the `time_t' representation of TP and normalize TP. */
extern time_t mktime (struct tm *__tp) __THROW;
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE characters and return the number
of characters written, or 0 if it would exceed MAXSIZE. */
extern size_t strftime (char *__restrict __s, size_t __maxsize,
const char *__restrict __format,
const struct tm *__restrict __tp) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_XOPEN
/* Parse S according to FORMAT and store binary time information in TP.
The return value is a pointer to the first unparsed character in S. */
extern char *strptime (const char *__restrict __s,
const char *__restrict __fmt, struct tm *__tp)
__THROW;
# endif
# 217 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_XOPEN2K8
/* Similar to the two functions above but take the information from
the provided locale and not the global locale. */
#if 0 /* expanded by -frewrite-includes */
# include <xlocale.h>
#endif /* expanded by -frewrite-includes */
# 221 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 222 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
const char *__restrict __format,
const struct tm *__restrict __tp,
__locale_t __loc) __THROW;
# endif
# 228 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_GNU
extern char *strptime_l (const char *__restrict __s,
const char *__restrict __fmt, struct tm *__tp,
__locale_t __loc) __THROW;
# endif
# 234 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Return the `struct tm' representation of *TIMER
in Universal Coordinated Time (aka Greenwich Mean Time). */
extern struct tm *gmtime (const time_t *__timer) __THROW;
/* Return the `struct tm' representation
of *TIMER in the local timezone. */
extern struct tm *localtime (const time_t *__timer) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_POSIX
/* Return the `struct tm' representation of *TIMER in UTC,
using *TP to store the result. */
extern struct tm *gmtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
/* Return the `struct tm' representation of *TIMER in local time,
using *TP to store the result. */
extern struct tm *localtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
# endif /* POSIX */
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__BEGIN_NAMESPACE_STD
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
extern char *asctime (const struct tm *__tp) __THROW;
/* Equivalent to `asctime (localtime (timer))'. */
extern char *ctime (const time_t *__timer) __THROW;
__END_NAMESPACE_STD
# ifdef __USE_POSIX
/* Reentrant versions of the above functions. */
/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
extern char *asctime_r (const struct tm *__restrict __tp,
char *__restrict __buf) __THROW;
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
extern char *ctime_r (const time_t *__restrict __timer,
char *__restrict __buf) __THROW;
# endif /* POSIX */
# 279 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Defined in localtime.c. */
extern char *__tzname[2]; /* Current timezone names. */
extern int __daylight; /* If daylight-saving time is ever in use. */
extern long int __timezone; /* Seconds west of UTC. */
# ifdef __USE_POSIX
/* Same as above. */
extern char *tzname[2];
/* Set time conversion information from the TZ environment variable.
If TZ is not defined, a locale-dependent default is used. */
extern void tzset (void) __THROW;
# endif
# 295 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# if defined __USE_MISC || defined __USE_XOPEN
extern int daylight;
extern long int timezone;
# endif
# 300 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_MISC
/* Set the system time to *WHEN.
This call is restricted to the superuser. */
extern int stime (const time_t *__when) __THROW;
# endif
# 306 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Nonzero if YEAR is a leap year (every 4 years,
except every 100th isn't, and every 400th is). */
# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
# ifdef __USE_MISC
/* Miscellaneous functions many Unices inherited from the public domain
localtime package. These are included only for compatibility. */
/* Like `mktime', but for TP represents Universal Time, not local time. */
extern time_t timegm (struct tm *__tp) __THROW;
/* Another name for `mktime'. */
extern time_t timelocal (struct tm *__tp) __THROW;
/* Return the number of days in YEAR. */
extern int dysize (int __year) __THROW __attribute__ ((__const__));
# endif
# 327 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_POSIX199309
/* Pause execution for a number of nanoseconds.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int nanosleep (const struct timespec *__requested_time,
struct timespec *__remaining);
/* Get resolution of clock CLOCK_ID. */
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
/* Get current value of clock CLOCK_ID and store it in TP. */
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
/* Set clock CLOCK_ID to value TP. */
extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
__THROW;
# ifdef __USE_XOPEN2K
/* High-resolution sleep with the specified clock.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
const struct timespec *__req,
struct timespec *__rem);
/* Return clock ID for CPU-time clock. */
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
# endif
# 360 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
/* Create new per-process timer using CLOCK_ID. */
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) __THROW;
/* Delete timer TIMERID. */
extern int timer_delete (timer_t __timerid) __THROW;
/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
extern int timer_settime (timer_t __timerid, int __flags,
const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) __THROW;
/* Get current value of timer TIMERID and store it in VALUE. */
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
__THROW;
/* Get expiration overrun for timer TIMERID. */
extern int timer_getoverrun (timer_t __timerid) __THROW;
# endif
# 382 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_ISOC11
/* Set TS to calendar time based in time base BASE. */
extern int timespec_get (struct timespec *__ts, int __base)
__THROW __nonnull ((1));
# endif
# 389 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_XOPEN_EXTENDED
/* Set to one of the following values to indicate an error.
1 the DATEMSK environment variable is null or undefined,
2 the template file cannot be opened for reading,
3 failed to get file status information,
4 the template file is not a regular file,
5 an error is encountered while reading the template file,
6 memory allication failed (not enough memory available),
7 there is no line in the template that matches the input,
8 invalid input specification Example: February 31 or a time is
specified that can not be represented in a time_t (representing
the time in seconds since 00:00:00 UTC, January 1, 1970) */
extern int getdate_err;
/* Parse the given string as a date specification and return a value
representing the value. The templates from the file identified by
the environment variable DATEMSK are used. In case of an error
`getdate_err' is set.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern struct tm *getdate (const char *__string);
# endif
# 414 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# ifdef __USE_GNU
/* Since `getdate' is not reentrant because of the use of `getdate_err'
and the static buffer to return the result in, we provide a thread-safe
variant. The functionality is the same. The result is returned in
the buffer pointed to by RESBUFP and in case of an error the return
value is != 0 with the same values as given above for `getdate_err'.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int getdate_r (const char *__restrict __string,
struct tm *__restrict __resbufp);
# endif
# 429 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
__END_DECLS
#endif /* <time.h> included. */
# 433 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
#endif /* <time.h> not already included. */
# 435 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/time.h" 3
# 25 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/pthreadtypes.h>
#endif /* expanded by -frewrite-includes */
# 26 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 1 3
/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
#if 0 /* expanded by -frewrite-includes */
#include <bits/wordsize.h>
#endif /* expanded by -frewrite-includes */
# 21 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 1 3
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# define __WORDSIZE 32
#endif
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
#ifdef __x86_64__
# define __WORDSIZE_TIME64_COMPAT32 1
/* Both x86-64 and x32 use the 64-bit system call interface. */
# define __SYSCALL_WORDSIZE 64
#endif
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# 22 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 2 3
#ifdef __x86_64__
# if __WORDSIZE == 64
# define __SIZEOF_PTHREAD_ATTR_T 56
# define __SIZEOF_PTHREAD_MUTEX_T 40
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 56
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 32
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
# else
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
# define __SIZEOF_PTHREAD_ATTR_T 32
# define __SIZEOF_PTHREAD_MUTEX_T 32
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 44
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
# endif
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
#else
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
# define __SIZEOF_PTHREAD_ATTR_T 36
# define __SIZEOF_PTHREAD_MUTEX_T 24
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 32
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#endif
# 56 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
/* Thread identifiers. The structure of the attribute type is not
exposed on purpose. */
typedef unsigned long int pthread_t;
union pthread_attr_t
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align;
};
#ifndef __have_pthread_attr_t
typedef union pthread_attr_t pthread_attr_t;
# define __have_pthread_attr_t 1
#endif
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
#ifdef __x86_64__
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
#else
# 81 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
typedef struct __pthread_internal_slist
{
struct __pthread_internal_slist *__next;
} __pthread_slist_t;
#endif
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
/* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
#ifdef __x86_64__
unsigned int __nusers;
#endif
# 100 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
/* KIND must stay at this position in the structure to maintain
binary compatibility. */
int __kind;
#ifdef __x86_64__
short __spins;
short __elision;
__pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */
# define __PTHREAD_SPINS 0, 0
#else
# 111 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
unsigned int __nusers;
__extension__ union
{
struct
{
short __espins;
short __elision;
# define __spins __elision_data.__espins
# define __elision __elision_data.__elision
# define __PTHREAD_SPINS { 0, 0 }
} __elision_data;
__pthread_slist_t __list;
};
#endif
# 125 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
int __align;
} pthread_mutexattr_t;
/* Data structure for conditional variable handling. The structure of
the attribute type is not exposed on purpose. */
typedef union
{
struct
{
int __lock;
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_CONDATTR_T];
int __align;
} pthread_condattr_t;
/* Keys for thread-specific data */
typedef unsigned int pthread_key_t;
/* Once-only execution */
typedef int pthread_once_t;
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Data structure for read-write lock variable handling. The
structure of the attribute type is not exposed on purpose. */
typedef union
{
# ifdef __x86_64__
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
int __shared;
signed char __rwelision;
# ifdef __ILP32__
unsigned char __pad1[3];
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
# else
# 192 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
unsigned char __pad1[7];
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
# endif
# 195 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
unsigned long int __pad2;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
} __data;
# else
# 202 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned char __flags;
unsigned char __shared;
signed char __rwelision;
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
unsigned char __pad2;
int __writer;
} __data;
# endif
# 220 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
long int __align;
} pthread_rwlockattr_t;
#endif
# 230 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
#ifdef __USE_XOPEN2K
/* POSIX spinlock data type. */
typedef volatile int pthread_spinlock_t;
/* POSIX barriers data type. The structure of the type is
deliberately not exposed. */
typedef union
{
char __size[__SIZEOF_PTHREAD_BARRIER_T];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
int __align;
} pthread_barrierattr_t;
#endif
# 251 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
#ifndef __x86_64__
/* Extra attributes for the cleanup functions. */
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
#endif
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
#endif /* bits/pthreadtypes.h */
# 259 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/pthreadtypes.h" 3
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/setjmp.h>
#endif /* expanded by -frewrite-includes */
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 1 3
/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
#ifndef _BITS_SETJMP_H
#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
# 25 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/wordsize.h>
#endif /* expanded by -frewrite-includes */
# 26 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 1 3
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# define __WORDSIZE 32
#endif
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
#ifdef __x86_64__
# define __WORDSIZE_TIME64_COMPAT32 1
/* Both x86-64 and x32 use the 64-bit system call interface. */
# define __SYSCALL_WORDSIZE 64
#endif
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# 27 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 2 3
#ifndef _ASM
# if __WORDSIZE == 64
typedef long int __jmp_buf[8];
# elif defined __x86_64__
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
__extension__ typedef long long int __jmp_buf[8];
# else
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
typedef int __jmp_buf[6];
# endif
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
#endif
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
#endif /* bits/setjmp.h */
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/setjmp.h" 3
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/wordsize.h>
#endif /* expanded by -frewrite-includes */
# 28 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 1 3
/* Determine the wordsize from the preprocessor defines. */
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
#else
# 6 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# define __WORDSIZE 32
#endif
# 8 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
#ifdef __x86_64__
# define __WORDSIZE_TIME64_COMPAT32 1
/* Both x86-64 and x32 use the 64-bit system call interface. */
# define __SYSCALL_WORDSIZE 64
#endif
# 14 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/bits/wordsize.h" 3
# 29 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 2 3
/* Detach state. */
enum
{
PTHREAD_CREATE_JOINABLE,
#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
PTHREAD_CREATE_DETACHED
#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
};
/* Mutex types. */
enum
{
PTHREAD_MUTEX_TIMED_NP,
PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_ADAPTIVE_NP
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
,
PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
#endif
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#ifdef __USE_GNU
/* For compatibility. */
, PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
#endif
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
};
#ifdef __USE_XOPEN2K
/* Robust mutex or not flags. */
enum
{
PTHREAD_MUTEX_STALLED,
PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
PTHREAD_MUTEX_ROBUST,
PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
};
#endif
# 72 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#if defined __USE_POSIX199506 || defined __USE_UNIX98
/* Mutex protocols. */
enum
{
PTHREAD_PRIO_NONE,
PTHREAD_PRIO_INHERIT,
PTHREAD_PRIO_PROTECT
};
#endif
# 83 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#ifdef __PTHREAD_MUTEX_HAVE_PREV
# define PTHREAD_MUTEX_INITIALIZER \
{ { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
# ifdef __USE_GNU
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } }
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
# endif
# 99 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#else
# 100 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# define PTHREAD_MUTEX_INITIALIZER \
{ { 0, 0, 0, 0, 0, { __PTHREAD_SPINS } } }
# ifdef __USE_GNU
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { __PTHREAD_SPINS } } }
# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { __PTHREAD_SPINS } } }
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
{ { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { __PTHREAD_SPINS } } }
# endif
# 111 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#endif
# 112 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Read-write lock types. */
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
enum
{
PTHREAD_RWLOCK_PREFER_READER_NP,
PTHREAD_RWLOCK_PREFER_WRITER_NP,
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
};
/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
has the shared field. All 64-bit architectures have the shared field
in pthread_rwlock_t. */
#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
# if __WORDSIZE == 64
# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
# endif
# 131 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#endif
# 132 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Read-write lock initializers. */
# define PTHREAD_RWLOCK_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
# ifdef __USE_GNU
# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, \
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
# else
# 142 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
# else
# 147 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
0 } }
# endif
# 151 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# endif
# 152 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# endif
# 153 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#endif /* Unix98 or XOpen2K */
# 154 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Scheduler inheritance. */
enum
{
PTHREAD_INHERIT_SCHED,
#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
PTHREAD_EXPLICIT_SCHED
#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
};
/* Scope handling. */
enum
{
PTHREAD_SCOPE_SYSTEM,
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
PTHREAD_SCOPE_PROCESS
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
};
/* Process shared or private flag. */
enum
{
PTHREAD_PROCESS_PRIVATE,
#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
PTHREAD_PROCESS_SHARED
#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
};
/* Conditional variable handling. */
#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }
/* Cleanup buffers */
struct _pthread_cleanup_buffer
{
void (*__routine) (void *); /* Function to call. */
void *__arg; /* Its argument. */
int __canceltype; /* Saved cancellation type. */
struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */
};
/* Cancellation */
enum
{
PTHREAD_CANCEL_ENABLE,
#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
PTHREAD_CANCEL_DISABLE
#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
};
enum
{
PTHREAD_CANCEL_DEFERRED,
#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
PTHREAD_CANCEL_ASYNCHRONOUS
#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
};
#define PTHREAD_CANCELED ((void *) -1)
/* Single execution handling. */
#define PTHREAD_ONCE_INIT 0
#ifdef __USE_XOPEN2K
/* Value returned by 'pthread_barrier_wait' for one of the threads after
the required number of threads have called this function.
-1 is distinct from 0 and all errno constants */
# define PTHREAD_BARRIER_SERIAL_THREAD -1
#endif
# 228 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
__BEGIN_DECLS
/* Create a new thread, starting with execution of START-ROUTINE
getting passed ARG. Creation attributed come from ATTR. The new
handle is stored in *NEWTHREAD. */
extern int pthread_create (pthread_t *__restrict __newthread,
const pthread_attr_t *__restrict __attr,
void *(*__start_routine) (void *),
void *__restrict __arg) __THROWNL __nonnull ((1, 3));
/* Terminate calling thread.
The registered cleanup handlers are called via exception handling
so we cannot mark this function with __THROW.*/
extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
/* Make calling thread wait for termination of the thread TH. The
exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN
is not NULL.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int pthread_join (pthread_t __th, void **__thread_return);
#ifdef __USE_GNU
/* Check whether thread TH has terminated. If yes return the status of
the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
/* Make calling thread wait for termination of the thread TH, but only
until TIMEOUT. The exit status of the thread is stored in
*THREAD_RETURN, if THREAD_RETURN is not NULL.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
const struct timespec *__abstime);
#endif
# 268 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
The resources of TH will therefore be freed immediately when it
terminates, instead of waiting for another thread to perform PTHREAD_JOIN
on it. */
extern int pthread_detach (pthread_t __th) __THROW;
/* Obtain the identifier of the current thread. */
extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__));
/* Compare two thread identifiers. */
extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
__THROW __attribute__ ((__const__));
/* Thread attribute handling. */
/* Initialize thread attribute *ATTR with default attributes
(detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER,
no user-provided stack). */
extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1));
/* Destroy thread attribute *ATTR. */
extern int pthread_attr_destroy (pthread_attr_t *__attr)
__THROW __nonnull ((1));
/* Get detach state attribute. */
extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
int *__detachstate)
__THROW __nonnull ((1, 2));
/* Set detach state attribute. */
extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
int __detachstate)
__THROW __nonnull ((1));
/* Get the size of the guard area created for stack overflow protection. */
extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
size_t *__guardsize)
__THROW __nonnull ((1, 2));
/* Set the size of the guard area created for stack overflow protection. */
extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
size_t __guardsize)
__THROW __nonnull ((1));
/* Return in *PARAM the scheduling parameters of *ATTR. */
extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
struct sched_param *__restrict __param)
__THROW __nonnull ((1, 2));
/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
const struct sched_param *__restrict
__param) __THROW __nonnull ((1, 2));
/* Return in *POLICY the scheduling policy of *ATTR. */
extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
__attr, int *__restrict __policy)
__THROW __nonnull ((1, 2));
/* Set scheduling policy in *ATTR according to POLICY. */
extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
__THROW __nonnull ((1));
/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
__attr, int *__restrict __inherit)
__THROW __nonnull ((1, 2));
/* Set scheduling inheritance mode in *ATTR according to INHERIT. */
extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
int __inherit)
__THROW __nonnull ((1));
/* Return in *SCOPE the scheduling contention scope of *ATTR. */
extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
int *__restrict __scope)
__THROW __nonnull ((1, 2));
/* Set scheduling contention scope in *ATTR according to SCOPE. */
extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
__THROW __nonnull ((1));
/* Return the previously set address for the stack. */
extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
__attr, void **__restrict __stackaddr)
__THROW __nonnull ((1, 2)) __attribute_deprecated__;
/* Set the starting address of the stack of the thread to be created.
Depending on whether the stack grows up or down the value must either
be higher or lower than all the address in the memory block. The
minimal size of the block must be PTHREAD_STACK_MIN. */
extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
void *__stackaddr)
__THROW __nonnull ((1)) __attribute_deprecated__;
/* Return the currently used minimal stack size. */
extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
__attr, size_t *__restrict __stacksize)
__THROW __nonnull ((1, 2));
/* Add information about the minimum stack size needed for the thread
to be started. This size must never be less than PTHREAD_STACK_MIN
and must also not exceed the system limits. */
extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
size_t __stacksize)
__THROW __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Return the previously set address for the stack. */
extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
void **__restrict __stackaddr,
size_t *__restrict __stacksize)
__THROW __nonnull ((1, 2, 3));
/* The following two interfaces are intended to replace the last two. They
require setting the address as well as the size since only setting the
address will make the implementation on some architectures impossible. */
extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
size_t __stacksize) __THROW __nonnull ((1));
#endif
# 394 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#ifdef __USE_GNU
/* Thread created with attribute ATTR will be limited to run only on
the processors represented in CPUSET. */
extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
size_t __cpusetsize,
const cpu_set_t *__cpuset)
__THROW __nonnull ((1, 3));
/* Get bit set in CPUSET representing the processors threads created with
ATTR can run on. */
extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
size_t __cpusetsize,
cpu_set_t *__cpuset)
__THROW __nonnull ((1, 3));
/* Get the default attributes used by pthread_create in this process. */
extern int pthread_getattr_default_np (pthread_attr_t *__attr)
__THROW __nonnull ((1));
/* Set the default attributes to be used by pthread_create in this
process. */
extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
__THROW __nonnull ((1));
/* Initialize thread attribute *ATTR with attributes corresponding to the
already running thread TH. It shall be called on uninitialized ATTR
and destroyed with pthread_attr_destroy when no longer needed. */
extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
__THROW __nonnull ((2));
#endif
# 425 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Functions for scheduling control. */
/* Set the scheduling parameters for TARGET_THREAD according to POLICY
and *PARAM. */
extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
const struct sched_param *__param)
__THROW __nonnull ((3));
/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
extern int pthread_getschedparam (pthread_t __target_thread,
int *__restrict __policy,
struct sched_param *__restrict __param)
__THROW __nonnull ((2, 3));
/* Set the scheduling priority for TARGET_THREAD. */
extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
__THROW;
#ifdef __USE_GNU
/* Get thread name visible in the kernel and its interfaces. */
extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
size_t __buflen)
__THROW __nonnull ((2));
/* Set thread name visible in the kernel and its interfaces. */
extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
__THROW __nonnull ((2));
#endif
# 456 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#ifdef __USE_UNIX98
/* Determine level of concurrency. */
extern int pthread_getconcurrency (void) __THROW;
/* Set new concurrency level to LEVEL. */
extern int pthread_setconcurrency (int __level) __THROW;
#endif
# 465 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#ifdef __USE_GNU
/* Yield the processor to another thread or process.
This function is similar to the POSIX `sched_yield' function but
might be differently implemented in the case of a m-on-n thread
implementation. */
extern int pthread_yield (void) __THROW;
/* Limit specified thread TH to run only on the processors represented
in CPUSET. */
extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
const cpu_set_t *__cpuset)
__THROW __nonnull ((3));
/* Get bit set in CPUSET representing the processors TH can run on. */
extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
cpu_set_t *__cpuset)
__THROW __nonnull ((3));
#endif
# 485 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Functions for handling initialization. */
/* Guarantee that the initialization function INIT_ROUTINE will be called
only once, even if pthread_once is executed several times with the
same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or
extern variable initialized to PTHREAD_ONCE_INIT.
The initialization functions might throw exception which is why
this function is not marked with __THROW. */
extern int pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void)) __nonnull ((1, 2));
/* Functions for handling cancellation.
Note that these functions are explicitly not marked to not throw an
exception in C++ code. If cancellation is implemented by unwinding
this is necessary to have the compiler generate the unwind information. */
/* Set cancelability state of current thread to STATE, returning old
state in *OLDSTATE if OLDSTATE is not NULL. */
extern int pthread_setcancelstate (int __state, int *__oldstate);
/* Set cancellation state of current thread to TYPE, returning the old
type in *OLDTYPE if OLDTYPE is not NULL. */
extern int pthread_setcanceltype (int __type, int *__oldtype);
/* Cancel THREAD immediately or at the next possibility. */
extern int pthread_cancel (pthread_t __th);
/* Test for pending cancellation for the current thread and terminate
the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
cancelled. */
extern void pthread_testcancel (void);
/* Cancellation handling with integration into exception handling. */
typedef struct
{
struct
{
__jmp_buf __cancel_jmp_buf;
int __mask_was_saved;
} __cancel_jmp_buf[1];
void *__pad[4];
} __pthread_unwind_buf_t __attribute__ ((__aligned__));
/* No special attributes by default. */
#ifndef __cleanup_fct_attribute
# define __cleanup_fct_attribute
#endif
# 539 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Structure to hold the cleanup handler information. */
struct __pthread_cleanup_frame
{
void (*__cancel_routine) (void *);
void *__cancel_arg;
int __do_it;
int __cancel_type;
};
#if defined __GNUC__ && defined __EXCEPTIONS
# ifdef __cplusplus
/* Class to handle cancellation handler invocation. */
class __pthread_cleanup_class
{
void (*__cancel_routine) (void *);
void *__cancel_arg;
int __do_it;
int __cancel_type;
public:
__pthread_cleanup_class (void (*__fct) (void *), void *__arg)
: __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { }
~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); }
void __setdoit (int __newval) { __do_it = __newval; }
void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED,
&__cancel_type); }
void __restore () const { pthread_setcanceltype (__cancel_type, 0); }
};
/* Install a cleanup handler: ROUTINE will be called with arguments ARG
when the thread is canceled or calls pthread_exit. ROUTINE will also
be called with arguments ARG when the matching pthread_cleanup_pop
is executed with non-zero EXECUTE argument.
pthread_cleanup_push and pthread_cleanup_pop are macros and must always
be used in matching pairs at the same nesting level of braces. */
# define pthread_cleanup_push(routine, arg) \
do { \
__pthread_cleanup_class __clframe (routine, arg)
/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
If EXECUTE is non-zero, the handler function is called. */
# define pthread_cleanup_pop(execute) \
__clframe.__setdoit (execute); \
} while (0)
# ifdef __USE_GNU
/* Install a cleanup handler as pthread_cleanup_push does, but also
saves the current cancellation type and sets it to deferred
cancellation. */
# define pthread_cleanup_push_defer_np(routine, arg) \
do { \
__pthread_cleanup_class __clframe (routine, arg); \
__clframe.__defer ()
/* Remove a cleanup handler as pthread_cleanup_pop does, but also
restores the cancellation type that was in effect when the matching
pthread_cleanup_push_defer was called. */
# define pthread_cleanup_pop_restore_np(execute) \
__clframe.__restore (); \
__clframe.__setdoit (execute); \
} while (0)
# endif
# 604 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# else
# 605 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Function called to call the cleanup handler. As an extern inline
function the compiler is free to decide inlining the change when
needed or fall back on the copy which must exist somewhere
else. */
__extern_inline void
__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
{
if (__frame->__do_it)
__frame->__cancel_routine (__frame->__cancel_arg);
}
/* Install a cleanup handler: ROUTINE will be called with arguments ARG
when the thread is canceled or calls pthread_exit. ROUTINE will also
be called with arguments ARG when the matching pthread_cleanup_pop
is executed with non-zero EXECUTE argument.
pthread_cleanup_push and pthread_cleanup_pop are macros and must always
be used in matching pairs at the same nesting level of braces. */
# define pthread_cleanup_push(routine, arg) \
do { \
struct __pthread_cleanup_frame __clframe \
__attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \
= { .__cancel_routine = (routine), .__cancel_arg = (arg), \
.__do_it = 1 };
/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
If EXECUTE is non-zero, the handler function is called. */
# define pthread_cleanup_pop(execute) \
__clframe.__do_it = (execute); \
} while (0)
# ifdef __USE_GNU
/* Install a cleanup handler as pthread_cleanup_push does, but also
saves the current cancellation type and sets it to deferred
cancellation. */
# define pthread_cleanup_push_defer_np(routine, arg) \
do { \
struct __pthread_cleanup_frame __clframe \
__attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \
= { .__cancel_routine = (routine), .__cancel_arg = (arg), \
.__do_it = 1 }; \
(void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, \
&__clframe.__cancel_type)
/* Remove a cleanup handler as pthread_cleanup_pop does, but also
restores the cancellation type that was in effect when the matching
pthread_cleanup_push_defer was called. */
# define pthread_cleanup_pop_restore_np(execute) \
(void) pthread_setcanceltype (__clframe.__cancel_type, NULL); \
__clframe.__do_it = (execute); \
} while (0)
# endif
# 657 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# endif
# 658 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#else
# 659 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Install a cleanup handler: ROUTINE will be called with arguments ARG
when the thread is canceled or calls pthread_exit. ROUTINE will also
be called with arguments ARG when the matching pthread_cleanup_pop
is executed with non-zero EXECUTE argument.
pthread_cleanup_push and pthread_cleanup_pop are macros and must always
be used in matching pairs at the same nesting level of braces. */
# define pthread_cleanup_push(routine, arg) \
do { \
__pthread_unwind_buf_t __cancel_buf; \
void (*__cancel_routine) (void *) = (routine); \
void *__cancel_arg = (arg); \
int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \
if (__glibc_unlikely (__not_first_call)) \
{ \
__cancel_routine (__cancel_arg); \
__pthread_unwind_next (&__cancel_buf); \
/* NOTREACHED */ \
} \
\
__pthread_register_cancel (&__cancel_buf); \
do {
extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
__cleanup_fct_attribute;
/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
If EXECUTE is non-zero, the handler function is called. */
# define pthread_cleanup_pop(execute) \
do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\
} while (0); \
__pthread_unregister_cancel (&__cancel_buf); \
if (execute) \
__cancel_routine (__cancel_arg); \
} while (0)
extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
__cleanup_fct_attribute;
# ifdef __USE_GNU
/* Install a cleanup handler as pthread_cleanup_push does, but also
saves the current cancellation type and sets it to deferred
cancellation. */
# define pthread_cleanup_push_defer_np(routine, arg) \
do { \
__pthread_unwind_buf_t __cancel_buf; \
void (*__cancel_routine) (void *) = (routine); \
void *__cancel_arg = (arg); \
int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \
if (__glibc_unlikely (__not_first_call)) \
{ \
__cancel_routine (__cancel_arg); \
__pthread_unwind_next (&__cancel_buf); \
/* NOTREACHED */ \
} \
\
__pthread_register_cancel_defer (&__cancel_buf); \
do {
extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
__cleanup_fct_attribute;
/* Remove a cleanup handler as pthread_cleanup_pop does, but also
restores the cancellation type that was in effect when the matching
pthread_cleanup_push_defer was called. */
# define pthread_cleanup_pop_restore_np(execute) \
do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\
} while (0); \
__pthread_unregister_cancel_restore (&__cancel_buf); \
if (execute) \
__cancel_routine (__cancel_arg); \
} while (0)
extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
__cleanup_fct_attribute;
# endif
# 733 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Internal interface to initiate cleanup. */
extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
__cleanup_fct_attribute __attribute__ ((__noreturn__))
# ifndef SHARED
__attribute__ ((__weak__))
# endif
# 740 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
;
#endif
# 742 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Function used in the macros. */
struct __jmp_buf_tag;
extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
/* Mutex handling. */
/* Initialize a mutex. */
extern int pthread_mutex_init (pthread_mutex_t *__mutex,
const pthread_mutexattr_t *__mutexattr)
__THROW __nonnull ((1));
/* Destroy a mutex. */
extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
__THROW __nonnull ((1));
/* Try locking a mutex. */
extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
__THROWNL __nonnull ((1));
/* Lock a mutex. */
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
__THROWNL __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
#endif
# 773 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Unlock a mutex. */
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
__THROWNL __nonnull ((1));
/* Get the priority ceiling of MUTEX. */
extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
__restrict __mutex,
int *__restrict __prioceiling)
__THROW __nonnull ((1, 2));
/* Set the priority ceiling of MUTEX to PRIOCEILING, return old
priority ceiling value in *OLD_CEILING. */
extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
int __prioceiling,
int *__restrict __old_ceiling)
__THROW __nonnull ((1, 3));
#ifdef __USE_XOPEN2K8
/* Declare the state protected by MUTEX as consistent. */
extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
__THROW __nonnull ((1));
# ifdef __USE_GNU
extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
__THROW __nonnull ((1));
# endif
# 801 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#endif
# 802 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Functions for handling mutex attributes. */
/* Initialize mutex attribute object ATTR with default attributes
(kind is PTHREAD_MUTEX_TIMED_NP). */
extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
__THROW __nonnull ((1));
/* Destroy mutex attribute object ATTR. */
extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
__THROW __nonnull ((1));
/* Get the process-shared flag of the mutex attribute ATTR. */
extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
/* Set the process-shared flag of the mutex attribute ATTR. */
extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
int __pshared)
__THROW __nonnull ((1));
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
/* Return in *KIND the mutex kind attribute in *ATTR. */
extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
__attr, int *__restrict __kind)
__THROW __nonnull ((1, 2));
/* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL,
PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or
PTHREAD_MUTEX_DEFAULT). */
extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
__THROW __nonnull ((1));
#endif
# 838 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */
extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __protocol)
__THROW __nonnull ((1, 2));
/* Set the mutex protocol attribute in *ATTR to PROTOCOL (either
PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */
extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
int __protocol)
__THROW __nonnull ((1));
/* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */
extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
__restrict __attr,
int *__restrict __prioceiling)
__THROW __nonnull ((1, 2));
/* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */
extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
int __prioceiling)
__THROW __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Get the robustness flag of the mutex attribute ATTR. */
extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
int *__robustness)
__THROW __nonnull ((1, 2));
# ifdef __USE_GNU
extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
int *__robustness)
__THROW __nonnull ((1, 2));
# endif
# 872 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Set the robustness flag of the mutex attribute ATTR. */
extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
int __robustness)
__THROW __nonnull ((1));
# ifdef __USE_GNU
extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
int __robustness)
__THROW __nonnull ((1));
# endif
# 882 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#endif
# 883 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Functions for handling read-write locks. */
/* Initialize read-write lock RWLOCK using attributes ATTR, or use
the default values if later is NULL. */
extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
const pthread_rwlockattr_t *__restrict
__attr) __THROW __nonnull ((1));
/* Destroy read-write lock RWLOCK. */
extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
__THROW __nonnull ((1));
/* Acquire read lock for RWLOCK. */
extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
__THROWNL __nonnull ((1));
/* Try to acquire read lock for RWLOCK. */
extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
__THROWNL __nonnull ((1));
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
# endif
# 912 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Acquire write lock for RWLOCK. */
extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
__THROWNL __nonnull ((1));
/* Try to acquire write lock for RWLOCK. */
extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
__THROWNL __nonnull ((1));
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
# endif
# 927 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Unlock RWLOCK. */
extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
__THROWNL __nonnull ((1));
/* Functions for handling read-write lock attributes. */
/* Initialize attribute object ATTR with default values. */
extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
__THROW __nonnull ((1));
/* Destroy attribute object ATTR. */
extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
__THROW __nonnull ((1));
/* Return current setting of process-shared attribute of ATTR in PSHARED. */
extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
/* Set process-shared attribute of ATTR to PSHARED. */
extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
int __pshared)
__THROW __nonnull ((1));
/* Return current setting of reader/writer preference. */
extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
__restrict __attr,
int *__restrict __pref)
__THROW __nonnull ((1, 2));
/* Set reader/write preference. */
extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
int __pref) __THROW __nonnull ((1));
#endif
# 964 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Functions for handling conditional variables. */
/* Initialize condition variable COND using attributes ATTR, or use
the default values if later is NULL. */
extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
const pthread_condattr_t *__restrict __cond_attr)
__THROW __nonnull ((1));
/* Destroy condition variable COND. */
extern int pthread_cond_destroy (pthread_cond_t *__cond)
__THROW __nonnull ((1));
/* Wake up one thread waiting for condition variable COND. */
extern int pthread_cond_signal (pthread_cond_t *__cond)
__THROWNL __nonnull ((1));
/* Wake up all threads waiting for condition variables COND. */
extern int pthread_cond_broadcast (pthread_cond_t *__cond)
__THROWNL __nonnull ((1));
/* Wait for condition variable COND to be signaled or broadcast.
MUTEX is assumed to be locked before.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex)
__nonnull ((1, 2));
/* Wait for condition variable COND to be signaled or broadcast until
ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
absolute time specification; zero is the beginning of the epoch
(00:00:00 GMT, January 1, 1970).
This function is a cancellation point and therefore not marked with
__THROW. */
extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2, 3));
/* Functions for handling condition variable attributes. */
/* Initialize condition variable attribute ATTR. */
extern int pthread_condattr_init (pthread_condattr_t *__attr)
__THROW __nonnull ((1));
/* Destroy condition variable attribute ATTR. */
extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
__THROW __nonnull ((1));
/* Get the process-shared flag of the condition variable attribute ATTR. */
extern int pthread_condattr_getpshared (const pthread_condattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
/* Set the process-shared flag of the condition variable attribute ATTR. */
extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
int __pshared) __THROW __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Get the clock selected for the condition variable attribute ATTR. */
extern int pthread_condattr_getclock (const pthread_condattr_t *
__restrict __attr,
__clockid_t *__restrict __clock_id)
__THROW __nonnull ((1, 2));
/* Set the clock selected for the condition variable attribute ATTR. */
extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
__clockid_t __clock_id)
__THROW __nonnull ((1));
#endif
# 1039 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
#ifdef __USE_XOPEN2K
/* Functions to handle spinlocks. */
/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can
be shared between different processes. */
extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
__THROW __nonnull ((1));
/* Destroy the spinlock LOCK. */
extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
__THROW __nonnull ((1));
/* Wait until spinlock LOCK is retrieved. */
extern int pthread_spin_lock (pthread_spinlock_t *__lock)
__THROWNL __nonnull ((1));
/* Try to lock spinlock LOCK. */
extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
__THROWNL __nonnull ((1));
/* Release spinlock LOCK. */
extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
__THROWNL __nonnull ((1));
/* Functions to handle barriers. */
/* Initialize BARRIER with the attributes in ATTR. The barrier is
opened when COUNT waiters arrived. */
extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
const pthread_barrierattr_t *__restrict
__attr, unsigned int __count)
__THROW __nonnull ((1));
/* Destroy a previously dynamically initialized barrier BARRIER. */
extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
__THROW __nonnull ((1));
/* Wait on barrier BARRIER. */
extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
__THROWNL __nonnull ((1));
/* Initialize barrier attribute ATTR. */
extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
__THROW __nonnull ((1));
/* Destroy previously dynamically initialized barrier attribute ATTR. */
extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
__THROW __nonnull ((1));
/* Get the process-shared flag of the barrier attribute ATTR. */
extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
__restrict __attr,
int *__restrict __pshared)
__THROW __nonnull ((1, 2));
/* Set the process-shared flag of the barrier attribute ATTR. */
extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
int __pshared)
__THROW __nonnull ((1));
#endif
# 1103 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Functions for handling thread-specific data. */
/* Create a key value identifying a location in the thread-specific
data area. Each thread maintains a distinct thread-specific data
area. DESTR_FUNCTION, if non-NULL, is called with the value
associated to that key when the key is destroyed.
DESTR_FUNCTION is not called if the value associated is NULL when
the key is destroyed. */
extern int pthread_key_create (pthread_key_t *__key,
void (*__destr_function) (void *))
__THROW __nonnull ((1));
/* Destroy KEY. */
extern int pthread_key_delete (pthread_key_t __key) __THROW;
/* Return current value of the thread-specific data slot identified by KEY. */
extern void *pthread_getspecific (pthread_key_t __key) __THROW;
/* Store POINTER in the thread-specific data slot identified by KEY. */
extern int pthread_setspecific (pthread_key_t __key,
const void *__pointer) __THROW ;
#ifdef __USE_XOPEN2K
/* Get ID of CPU-time clock for thread THREAD_ID. */
extern int pthread_getcpuclockid (pthread_t __thread_id,
__clockid_t *__clock_id)
__THROW __nonnull ((2));
#endif
# 1134 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
/* Install handlers to be called when a new process is created with FORK.
The PREPARE handler is called in the parent process just before performing
FORK. The PARENT handler is called in the parent process just after FORK.
The CHILD handler is called in the child process. Each of the three
handlers can be NULL, meaning that no handler needs to be called at that
point.
PTHREAD_ATFORK can be called several times, in which case the PREPARE
handlers are called in LIFO order (last added with PTHREAD_ATFORK,
first called before FORK), and the PARENT and CHILD handlers are called
in FIFO (first added, first called). */
extern int pthread_atfork (void (*__prepare) (void),
void (*__parent) (void),
void (*__child) (void)) __THROW;
#ifdef __USE_EXTERN_INLINES
/* Optimizations. */
#if defined (__cplusplus) && defined(__clang__)
__attribute__((always_inline, weak)) inline
#else
# 1157 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
__extern_inline
#endif
# 1159 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
int
__NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2))
{
return __thread1 == __thread2;
}
#endif
# 1165 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
__END_DECLS
#endif /* pthread.h */
# 1169 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/glibc/include/pthread.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 2 3
#if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
|| !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK))
#if 0 /* expanded by -frewrite-includes */
# include <unistd.h>
#endif /* expanded by -frewrite-includes */
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# 40 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 0
# define _GTHREAD_USE_MUTEX_TIMEDLOCK 1
# else
# 43 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# define _GTHREAD_USE_MUTEX_TIMEDLOCK 0
# endif
# 45 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif
# 46 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
typedef pthread_t __gthread_t;
typedef pthread_key_t __gthread_key_t;
typedef pthread_once_t __gthread_once_t;
typedef pthread_mutex_t __gthread_mutex_t;
typedef pthread_mutex_t __gthread_recursive_mutex_t;
typedef pthread_cond_t __gthread_cond_t;
typedef struct timespec __gthread_time_t;
/* POSIX like conditional variables are supported. Please look at comments
in gthr.h for details. */
#define __GTHREAD_HAS_COND 1
#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
#define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
# 65 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
#else
# 67 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
#endif
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
#define __GTHREAD_TIME_INIT {0,0}
#ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
# undef __GTHREAD_MUTEX_INIT
#endif
# 75 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
# undef __GTHREAD_RECURSIVE_MUTEX_INIT
# undef __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
# define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
#endif
# 80 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#ifdef _GTHREAD_USE_COND_INIT_FUNC
# undef __GTHREAD_COND_INIT
# define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function
#endif
# 84 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
# ifndef __gthrw_pragma
# define __gthrw_pragma(pragma)
# endif
# 89 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# define __gthrw2(name,name2,type) \
static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
__gthrw_pragma(weak type)
# define __gthrw_(name) __gthrw_ ## name
#else
# 94 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# define __gthrw2(name,name2,type)
# define __gthrw_(name) name
#endif
# 97 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
/* Typically, __gthrw_foo is a weak reference to symbol foo. */
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
__gthrw(pthread_once)
__gthrw(pthread_getspecific)
__gthrw(pthread_setspecific)
__gthrw(pthread_create)
__gthrw(pthread_join)
__gthrw(pthread_equal)
__gthrw(pthread_self)
__gthrw(pthread_detach)
#ifndef __BIONIC__
__gthrw(pthread_cancel)
#endif
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
__gthrw(sched_yield)
__gthrw(pthread_mutex_lock)
__gthrw(pthread_mutex_trylock)
#if _GTHREAD_USE_MUTEX_TIMEDLOCK
__gthrw(pthread_mutex_timedlock)
#endif
# 120 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
__gthrw(pthread_mutex_unlock)
__gthrw(pthread_mutex_init)
__gthrw(pthread_mutex_destroy)
__gthrw(pthread_cond_init)
__gthrw(pthread_cond_broadcast)
__gthrw(pthread_cond_signal)
__gthrw(pthread_cond_wait)
__gthrw(pthread_cond_timedwait)
__gthrw(pthread_cond_destroy)
__gthrw(pthread_key_create)
__gthrw(pthread_key_delete)
__gthrw(pthread_mutexattr_init)
__gthrw(pthread_mutexattr_settype)
__gthrw(pthread_mutexattr_destroy)
#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
/* Objective-C. */
__gthrw(pthread_exit)
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
__gthrw(sched_get_priority_max)
__gthrw(sched_get_priority_min)
#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
# 146 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif /* _POSIX_PRIORITY_SCHEDULING */
# 147 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
__gthrw(pthread_attr_destroy)
__gthrw(pthread_attr_init)
__gthrw(pthread_attr_setdetachstate)
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
__gthrw(pthread_getschedparam)
__gthrw(pthread_setschedparam)
#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
# 154 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif /* _LIBOBJC || _LIBOBJC_WEAK */
# 155 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
-pthreads is not specified. The functions are dummies and most return an
error value. However pthread_once returns 0 without invoking the routine
it is passed so we cannot pretend that the interface is active if -pthreads
is not specified. On Solaris 2.5.1, the interface is not exposed at all so
we need to play the usual game with weak symbols. On Solaris 10 and up, a
working interface is always exposed. On FreeBSD 6 and later, libc also
exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
which means the alternate __gthread_active_p below cannot be used there. */
#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
static volatile int __gthread_active = -1;
static void
__gthread_trigger (void)
{
__gthread_active = 1;
}
static inline int
__gthread_active_p (void)
{
static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
/* Avoid reading __gthread_active twice on the main code path. */
int __gthread_active_latest_value = __gthread_active;
/* This test is not protected to avoid taking a lock on the main code
path so every update of __gthread_active in a threaded program must
be atomic with regard to the result of the test. */
if (__builtin_expect (__gthread_active_latest_value < 0, 0))
{
if (__gthrw_(pthread_once))
{
/* If this really is a threaded program, then we must ensure that
__gthread_active has been set to 1 before exiting this block. */
__gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
__gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
__gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
}
/* Make sure we'll never enter this block again. */
if (__gthread_active < 0)
__gthread_active = 0;
__gthread_active_latest_value = __gthread_active;
}
return __gthread_active_latest_value != 0;
}
#else /* neither FreeBSD nor Solaris */
# 213 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
/* For a program to be multi-threaded the only thing that it certainly must
be using is pthread_create. However, there may be other libraries that
intercept pthread_create with their own definitions to wrap pthreads
functionality for some purpose. In those cases, pthread_create being
defined might not necessarily mean that libpthread is actually linked
in.
For the GNU C library, we can use a known internal name. This is always
available in the ABI, but no other library would define it. That is
ideal, since any public pthread function might be intercepted just as
pthread_create might be. __pthread_key_create is an "internal"
implementation symbol, but it is part of the public exported ABI. Also,
it's among the symbols that the static libpthread.a always links in
whenever pthread_create is used, so there is no danger of a false
negative result in any statically-linked, multi-threaded program.
For others, we choose pthread_cancel as a function that seems unlikely
to be redefined by an interceptor library. The bionic (Android) C
library does not provide pthread_cancel, so we do use pthread_create
there (and interceptor libraries lose). */
#ifdef __GLIBC__
__gthrw2(__gthrw_(__pthread_key_create),
__pthread_key_create,
pthread_key_create)
# define GTHR_ACTIVE_PROXY __gthrw_(__pthread_key_create)
#elif defined (__BIONIC__)
# 241 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# define GTHR_ACTIVE_PROXY __gthrw_(pthread_create)
#else
# 243 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# define GTHR_ACTIVE_PROXY __gthrw_(pthread_cancel)
#endif
# 245 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_active_p (void)
{
static void *const __gthread_active_ptr
= __extension__ (void *) &GTHR_ACTIVE_PROXY;
return __gthread_active_ptr != 0;
}
#endif /* FreeBSD or Solaris */
# 255 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#else /* not __GXX_WEAK__ */
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
calls in shared flavors of the HP-UX C library. Most of the stubs
have no functionality. The details are described in the "libc cumulative
patch" for each subversion of HP-UX 11. There are two special interfaces
provided for checking whether an application is linked to a shared pthread
library or not. However, these interfaces aren't available in early
libpthread libraries. We also need a test that works for archive
libraries. We can't use pthread_once as some libc versions call the
init function. We also can't use pthread_create or pthread_attr_init
as these create a thread and thereby prevent changing the default stack
size. The function pthread_default_stacksize_np is available in both
the archive and shared versions of libpthread. It can be used to
determine the default pthread stack size. There is a stub in some
shared libc versions which returns a zero size if pthreads are not
active. We provide an equivalent stub to handle cases where libc
doesn't provide one. */
#if defined(__hppa__) && defined(__hpux__)
static volatile int __gthread_active = -1;
static inline int
__gthread_active_p (void)
{
/* Avoid reading __gthread_active twice on the main code path. */
int __gthread_active_latest_value = __gthread_active;
size_t __s;
if (__builtin_expect (__gthread_active_latest_value < 0, 0))
{
pthread_default_stacksize_np (0, &__s);
__gthread_active = __s ? 1 : 0;
__gthread_active_latest_value = __gthread_active;
}
return __gthread_active_latest_value != 0;
}
#else /* not hppa-hpux */
# 297 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_active_p (void)
{
return 1;
}
#endif /* hppa-hpux */
# 305 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif /* __GXX_WEAK__ */
# 307 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#ifdef _LIBOBJC
/* This is the config.h file in libobjc/ */
#if 0 /* expanded by -frewrite-includes */
#include <config.h>
#endif /* expanded by -frewrite-includes */
# 311 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# 312 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#ifdef HAVE_SCHED_H
#if 0 /* expanded by -frewrite-includes */
# include <sched.h>
#endif /* expanded by -frewrite-includes */
# 314 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# 315 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif
# 316 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
/* Key structure for maintaining thread specific storage */
static pthread_key_t _objc_thread_storage;
static pthread_attr_t _objc_thread_attribs;
/* Thread local storage for a single thread */
static void *thread_local_storage = NULL;
/* Backend initialization functions */
/* Initialize the threads subsystem. */
static inline int
__gthread_objc_init_thread_system (void)
{
if (__gthread_active_p ())
{
/* Initialize the thread storage key. */
if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
{
/* The normal default detach state for threads is
* PTHREAD_CREATE_JOINABLE which causes threads to not die
* when you think they should. */
if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
&& __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
PTHREAD_CREATE_DETACHED) == 0)
return 0;
}
}
return -1;
}
/* Close the threads subsystem. */
static inline int
__gthread_objc_close_thread_system (void)
{
if (__gthread_active_p ()
&& __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
&& __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
return 0;
return -1;
}
/* Backend thread functions */
/* Create a new thread of execution. */
static inline objc_thread_t
__gthread_objc_thread_detach (void (*func)(void *), void *arg)
{
objc_thread_t thread_id;
pthread_t new_thread_handle;
if (!__gthread_active_p ())
return NULL;
if (!(__gthrw_(pthread_create) (&new_thread_handle, &_objc_thread_attribs,
(void *) func, arg)))
thread_id = (objc_thread_t) new_thread_handle;
else
thread_id = NULL;
return thread_id;
}
/* Set the current thread's priority. */
static inline int
__gthread_objc_thread_set_priority (int priority)
{
if (!__gthread_active_p ())
return -1;
else
{
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
pthread_t thread_id = __gthrw_(pthread_self) ();
int policy;
struct sched_param params;
int priority_min, priority_max;
if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
{
if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
return -1;
if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
return -1;
if (priority > priority_max)
priority = priority_max;
else if (priority < priority_min)
priority = priority_min;
params.sched_priority = priority;
/*
* The solaris 7 and several other man pages incorrectly state that
* this should be a pointer to policy but pthread.h is universally
* at odds with this.
*/
if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
return 0;
}
#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
# 419 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif /* _POSIX_PRIORITY_SCHEDULING */
# 420 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
return -1;
}
}
/* Return the current thread's priority. */
static inline int
__gthread_objc_thread_get_priority (void)
{
#ifdef _POSIX_PRIORITY_SCHEDULING
#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
if (__gthread_active_p ())
{
int policy;
struct sched_param params;
if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
return params.sched_priority;
else
return -1;
}
else
#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
# 442 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif /* _POSIX_PRIORITY_SCHEDULING */
# 443 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
return OBJC_THREAD_INTERACTIVE_PRIORITY;
}
/* Yield our process time to another thread. */
static inline void
__gthread_objc_thread_yield (void)
{
if (__gthread_active_p ())
__gthrw_(sched_yield) ();
}
/* Terminate the current thread. */
static inline int
__gthread_objc_thread_exit (void)
{
if (__gthread_active_p ())
/* exit the thread */
__gthrw_(pthread_exit) (&__objc_thread_exit_status);
/* Failed if we reached here */
return -1;
}
/* Returns an integer value which uniquely describes a thread. */
static inline objc_thread_t
__gthread_objc_thread_id (void)
{
if (__gthread_active_p ())
return (objc_thread_t) __gthrw_(pthread_self) ();
else
return (objc_thread_t) 1;
}
/* Sets the thread's local storage pointer. */
static inline int
__gthread_objc_thread_set_data (void *value)
{
if (__gthread_active_p ())
return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
else
{
thread_local_storage = value;
return 0;
}
}
/* Returns the thread's local storage pointer. */
static inline void *
__gthread_objc_thread_get_data (void)
{
if (__gthread_active_p ())
return __gthrw_(pthread_getspecific) (_objc_thread_storage);
else
return thread_local_storage;
}
/* Backend mutex functions */
/* Allocate a mutex. */
static inline int
__gthread_objc_mutex_allocate (objc_mutex_t mutex)
{
if (__gthread_active_p ())
{
mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
{
objc_free (mutex->backend);
mutex->backend = NULL;
return -1;
}
}
return 0;
}
/* Deallocate a mutex. */
static inline int
__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
{
if (__gthread_active_p ())
{
int count;
/*
* Posix Threads specifically require that the thread be unlocked
* for __gthrw_(pthread_mutex_destroy) to work.
*/
do
{
count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
if (count < 0)
return -1;
}
while (count);
if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
return -1;
objc_free (mutex->backend);
mutex->backend = NULL;
}
return 0;
}
/* Grab a lock on a mutex. */
static inline int
__gthread_objc_mutex_lock (objc_mutex_t mutex)
{
if (__gthread_active_p ()
&& __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
{
return -1;
}
return 0;
}
/* Try to grab a lock on a mutex. */
static inline int
__gthread_objc_mutex_trylock (objc_mutex_t mutex)
{
if (__gthread_active_p ()
&& __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
{
return -1;
}
return 0;
}
/* Unlock the mutex */
static inline int
__gthread_objc_mutex_unlock (objc_mutex_t mutex)
{
if (__gthread_active_p ()
&& __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
{
return -1;
}
return 0;
}
/* Backend condition mutex functions */
/* Allocate a condition. */
static inline int
__gthread_objc_condition_allocate (objc_condition_t condition)
{
if (__gthread_active_p ())
{
condition->backend = objc_malloc (sizeof (pthread_cond_t));
if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
{
objc_free (condition->backend);
condition->backend = NULL;
return -1;
}
}
return 0;
}
/* Deallocate a condition. */
static inline int
__gthread_objc_condition_deallocate (objc_condition_t condition)
{
if (__gthread_active_p ())
{
if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
return -1;
objc_free (condition->backend);
condition->backend = NULL;
}
return 0;
}
/* Wait on the condition */
static inline int
__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
{
if (__gthread_active_p ())
return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
(pthread_mutex_t *) mutex->backend);
else
return 0;
}
/* Wake up all threads waiting on this condition. */
static inline int
__gthread_objc_condition_broadcast (objc_condition_t condition)
{
if (__gthread_active_p ())
return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
else
return 0;
}
/* Wake up one thread waiting on this condition. */
static inline int
__gthread_objc_condition_signal (objc_condition_t condition)
{
if (__gthread_active_p ())
return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
else
return 0;
}
#else /* _LIBOBJC */
# 657 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
void *__args)
{
return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
}
static inline int
__gthread_join (__gthread_t __threadid, void **__value_ptr)
{
return __gthrw_(pthread_join) (__threadid, __value_ptr);
}
static inline int
__gthread_detach (__gthread_t __threadid)
{
return __gthrw_(pthread_detach) (__threadid);
}
static inline int
__gthread_equal (__gthread_t __t1, __gthread_t __t2)
{
return __gthrw_(pthread_equal) (__t1, __t2);
}
static inline __gthread_t
__gthread_self (void)
{
return __gthrw_(pthread_self) ();
}
static inline int
__gthread_yield (void)
{
return __gthrw_(sched_yield) ();
}
static inline int
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
{
if (__gthread_active_p ())
return __gthrw_(pthread_once) (__once, __func);
else
return -1;
}
static inline int
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
{
return __gthrw_(pthread_key_create) (__key, __dtor);
}
static inline int
__gthread_key_delete (__gthread_key_t __key)
{
return __gthrw_(pthread_key_delete) (__key);
}
static inline void *
__gthread_getspecific (__gthread_key_t __key)
{
return __gthrw_(pthread_getspecific) (__key);
}
static inline int
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
{
return __gthrw_(pthread_setspecific) (__key, __ptr);
}
static inline void
__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
__gthrw_(pthread_mutex_init) (__mutex, NULL);
}
static inline int
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthrw_(pthread_mutex_destroy) (__mutex);
else
return 0;
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthrw_(pthread_mutex_lock) (__mutex);
else
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthrw_(pthread_mutex_trylock) (__mutex);
else
return 0;
}
#if _GTHREAD_USE_MUTEX_TIMEDLOCK
static inline int
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
const __gthread_time_t *__abs_timeout)
{
if (__gthread_active_p ())
return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
else
return 0;
}
#endif
# 773 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
{
if (__gthread_active_p ())
return __gthrw_(pthread_mutex_unlock) (__mutex);
else
return 0;
}
#if !defined( PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) \
|| defined(_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC)
static inline int
__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
{
if (__gthread_active_p ())
{
pthread_mutexattr_t __attr;
int __r;
__r = __gthrw_(pthread_mutexattr_init) (&__attr);
if (!__r)
__r = __gthrw_(pthread_mutexattr_settype) (&__attr,
PTHREAD_MUTEX_RECURSIVE);
if (!__r)
__r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
if (!__r)
__r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
return __r;
}
return 0;
}
#endif
# 806 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
{
return __gthread_mutex_lock (__mutex);
}
static inline int
__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
{
return __gthread_mutex_trylock (__mutex);
}
#if _GTHREAD_USE_MUTEX_TIMEDLOCK
static inline int
__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
const __gthread_time_t *__abs_timeout)
{
return __gthread_mutex_timedlock (__mutex, __abs_timeout);
}
#endif
# 827 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
{
return __gthread_mutex_unlock (__mutex);
}
static inline int
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
{
return __gthread_mutex_destroy (__mutex);
}
#ifdef _GTHREAD_USE_COND_INIT_FUNC
static inline void
__gthread_cond_init_function (__gthread_cond_t *__cond)
{
if (__gthread_active_p ())
__gthrw_(pthread_cond_init) (__cond, NULL);
}
#endif
# 848 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
static inline int
__gthread_cond_broadcast (__gthread_cond_t *__cond)
{
return __gthrw_(pthread_cond_broadcast) (__cond);
}
static inline int
__gthread_cond_signal (__gthread_cond_t *__cond)
{
return __gthrw_(pthread_cond_signal) (__cond);
}
static inline int
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
{
return __gthrw_(pthread_cond_wait) (__cond, __mutex);
}
static inline int
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
const __gthread_time_t *__abs_timeout)
{
return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
}
static inline int
__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
__gthread_recursive_mutex_t *__mutex)
{
return __gthread_cond_wait (__cond, __mutex);
}
static inline int
__gthread_cond_destroy (__gthread_cond_t* __cond)
{
return __gthrw_(pthread_cond_destroy) (__cond);
}
#endif /* _LIBOBJC */
# 888 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
# 890 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr-default.h" 3
# 149 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 2 3
#ifndef _GLIBCXX_HIDE_EXPORTS
#pragma GCC visibility pop
#endif
# 153 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
#endif /* ! _GLIBCXX_GCC_GTHR_H */
# 155 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/gthr.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/atomic_word.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/atomic_word.h" 1 3
// Low-level type for atomic operations -*- C++ -*-
// Copyright (C) 2004-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file atomic_word.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _GLIBCXX_ATOMIC_WORD_H
#define _GLIBCXX_ATOMIC_WORD_H 1
typedef int _Atomic_word;
// Define these two macros using the appropriate memory barrier for the target.
// The commented out versions below are the defaults.
// See ia64/atomic_word.h for an alternative approach.
// This one prevents loads from being hoisted across the barrier;
// in other words, this is a Load-Load acquire barrier.
// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
// This one prevents stores from being sunk across the barrier; in other
// words, a Store-Store release barrier.
// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/x86_64-facebook-linux/bits/atomic_word.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 2 3
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Functions for portable atomic access.
// To abstract locking primitives across all thread policies, use:
// __exchange_and_add_dispatch
// __atomic_add_dispatch
#ifdef _GLIBCXX_ATOMIC_BUILTINS
static inline _Atomic_word
__exchange_and_add(volatile _Atomic_word* __mem, int __val)
{ return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
static inline void
__atomic_add(volatile _Atomic_word* __mem, int __val)
{ __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
#else
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
_Atomic_word
__attribute__ ((__unused__))
__exchange_and_add(volatile _Atomic_word*, int) throw ();
void
__attribute__ ((__unused__))
__atomic_add(volatile _Atomic_word*, int) throw ();
#endif
# 63 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
static inline _Atomic_word
__exchange_and_add_single(_Atomic_word* __mem, int __val)
{
_Atomic_word __result = *__mem;
*__mem += __val;
return __result;
}
static inline void
__atomic_add_single(_Atomic_word* __mem, int __val)
{ *__mem += __val; }
static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add_dispatch(_Atomic_word* __mem, int __val)
{
#ifdef __GTHREADS
if (__gthread_active_p())
return __exchange_and_add(__mem, __val);
else
return __exchange_and_add_single(__mem, __val);
#else
# 86 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
return __exchange_and_add_single(__mem, __val);
#endif
# 88 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
}
static inline void
__attribute__ ((__unused__))
__atomic_add_dispatch(_Atomic_word* __mem, int __val)
{
#ifdef __GTHREADS
if (__gthread_active_p())
__atomic_add(__mem, __val);
else
__atomic_add_single(__mem, __val);
#else
# 100 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
__atomic_add_single(__mem, __val);
#endif
# 102 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
// Even if the CPU doesn't need a memory barrier, we need to ensure
// that the compiler doesn't reorder memory accesses across the
// barriers.
#ifndef _GLIBCXX_READ_MEM_BARRIER
#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
#endif
# 113 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
#ifndef _GLIBCXX_WRITE_MEM_BARRIER
#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
#endif
# 116 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
#endif
# 118 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/atomicity.h" 3
# 74 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <ext/concurrence.h>
#endif /* expanded by -frewrite-includes */
# 74 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 1 3
// Support for concurrent programing -*- C++ -*-
// Copyright (C) 2003-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/concurrence.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _CONCURRENCE_H
#define _CONCURRENCE_H 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <exception>
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/gthr.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/functexcept.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/cpp_type_traits.h>
#endif /* expanded by -frewrite-includes */
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <ext/type_traits.h>
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
# 39 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Available locking policies:
// _S_single single-threaded code that doesn't need to be locked.
// _S_mutex multi-threaded code that requires additional support
// from gthr.h or abstraction layers in concurrence.h.
// _S_atomic multi-threaded code using atomic operations.
enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
// Compile time constant that indicates prefered locking policy in
// the current configuration.
static const _Lock_policy __default_lock_policy =
#ifdef __GTHREADS
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \
&& defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4))
_S_atomic;
#else
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
_S_mutex;
#endif
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
#else
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
_S_single;
#endif
# 64 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
// NB: As this is used in libsupc++, need to only depend on
// exception. No stdexception classes, no use of std::string.
class __concurrence_lock_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_lock_error"; }
};
class __concurrence_unlock_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_unlock_error"; }
};
class __concurrence_broadcast_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_broadcast_error"; }
};
class __concurrence_wait_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_wait_error"; }
};
// Substitute for concurrence_error object in the case of -fno-exceptions.
inline void
__throw_concurrence_lock_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_lock_error()); }
inline void
__throw_concurrence_unlock_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_unlock_error()); }
#ifdef __GTHREAD_HAS_COND
inline void
__throw_concurrence_broadcast_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_broadcast_error()); }
inline void
__throw_concurrence_wait_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_wait_error()); }
#endif
# 117 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
class __mutex
{
private:
#if __GTHREADS && defined __GTHREAD_MUTEX_INIT
__gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
#else
# 124 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
__gthread_mutex_t _M_mutex;
#endif
# 126 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
__mutex(const __mutex&);
__mutex& operator=(const __mutex&);
public:
__mutex()
{
#if __GTHREADS && ! defined __GTHREAD_MUTEX_INIT
if (__gthread_active_p())
__GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
#endif
# 137 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
#if __GTHREADS && ! defined __GTHREAD_MUTEX_INIT
~__mutex()
{
if (__gthread_active_p())
__gthread_mutex_destroy(&_M_mutex);
}
#endif
# 146 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
void lock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_mutex_lock(&_M_mutex) != 0)
__throw_concurrence_lock_error();
}
#endif
# 156 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
void unlock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_mutex_unlock(&_M_mutex) != 0)
__throw_concurrence_unlock_error();
}
#endif
# 167 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
__gthread_mutex_t* gthread_mutex(void)
{ return &_M_mutex; }
};
class __recursive_mutex
{
private:
#if __GTHREADS && defined __GTHREAD_RECURSIVE_MUTEX_INIT
__gthread_recursive_mutex_t _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;
#else
# 179 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
__gthread_recursive_mutex_t _M_mutex;
#endif
# 181 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
__recursive_mutex(const __recursive_mutex&);
__recursive_mutex& operator=(const __recursive_mutex&);
public:
__recursive_mutex()
{
#if __GTHREADS && ! defined __GTHREAD_RECURSIVE_MUTEX_INIT
if (__gthread_active_p())
__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
#endif
# 192 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
#if __GTHREADS && ! defined __GTHREAD_RECURSIVE_MUTEX_INIT
~__recursive_mutex()
{
if (__gthread_active_p())
__gthread_recursive_mutex_destroy(&_M_mutex);
}
#endif
# 201 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
void lock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_recursive_mutex_lock(&_M_mutex) != 0)
__throw_concurrence_lock_error();
}
#endif
# 211 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
void unlock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0)
__throw_concurrence_unlock_error();
}
#endif
# 222 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
__gthread_recursive_mutex_t* gthread_recursive_mutex(void)
{ return &_M_mutex; }
};
/// Scoped lock idiom.
// Acquire the mutex here with a constructor call, then release with
// the destructor call in accordance with RAII style.
class __scoped_lock
{
public:
typedef __mutex __mutex_type;
private:
__mutex_type& _M_device;
__scoped_lock(const __scoped_lock&);
__scoped_lock& operator=(const __scoped_lock&);
public:
explicit __scoped_lock(__mutex_type& __name) : _M_device(__name)
{ _M_device.lock(); }
~__scoped_lock() throw()
{ _M_device.unlock(); }
};
#ifdef __GTHREAD_HAS_COND
class __cond
{
private:
#if __GTHREADS && defined __GTHREAD_COND_INIT
__gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
#else
# 257 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
__gthread_cond_t _M_cond;
#endif
# 259 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
__cond(const __cond&);
__cond& operator=(const __cond&);
public:
__cond()
{
#if __GTHREADS && ! defined __GTHREAD_COND_INIT
if (__gthread_active_p())
__GTHREAD_COND_INIT_FUNCTION(&_M_cond);
#endif
# 270 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
#if __GTHREADS && ! defined __GTHREAD_COND_INIT
~__cond()
{
if (__gthread_active_p())
__gthread_cond_destroy(&_M_cond);
}
#endif
# 279 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
void broadcast()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_cond_broadcast(&_M_cond) != 0)
__throw_concurrence_broadcast_error();
}
#endif
# 289 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
void wait(__mutex *mutex)
{
#if __GTHREADS
{
if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0)
__throw_concurrence_wait_error();
}
#endif
# 299 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
void wait_recursive(__recursive_mutex *mutex)
{
#if __GTHREADS
{
if (__gthread_cond_wait_recursive(&_M_cond,
mutex->gthread_recursive_mutex())
!= 0)
__throw_concurrence_wait_error();
}
#endif
# 311 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
}
};
#endif
# 314 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
# 319 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/ext/concurrence.h" 3
# 75 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/functexcept.h>
#endif /* expanded by -frewrite-includes */
# 75 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/stl_function.h> // std::less
#endif /* expanded by -frewrite-includes */
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 1 3
// Functor implementations -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file bits/stl_function.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{functional}
*/
#ifndef _STL_FUNCTION_H
#define _STL_FUNCTION_H 1
#if __cplusplus > 201103L
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h>
#endif /* expanded by -frewrite-includes */
# 60 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
# 61 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
#endif
# 62 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// 20.3.1 base classes
/** @defgroup functors Function Objects
* @ingroup utilities
*
* Function objects, or @e functors, are objects with an @c operator()
* defined and accessible. They can be passed as arguments to algorithm
* templates and used in place of a function pointer. Not only is the
* resulting expressiveness of the library increased, but the generated
* code can be more efficient than what you might write by hand. When we
* refer to @a functors, then, generally we include function pointers in
* the description as well.
*
* Often, functors are only created as temporaries passed to algorithm
* calls, rather than being created as named variables.
*
* Two examples taken from the standard itself follow. To perform a
* by-element addition of two vectors @c a and @c b containing @c double,
* and put the result in @c a, use
* \code
* transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
* \endcode
* To negate every element in @c a, use
* \code
* transform(a.begin(), a.end(), a.begin(), negate<double>());
* \endcode
* The addition and negation functions will be inlined directly.
*
* The standard functors are derived from structs named @c unary_function
* and @c binary_function. These two classes contain nothing but typedefs,
* to aid in generic (template) programming. If you write your own
* functors, you might consider doing the same.
*
* @{
*/
/**
* This is one of the @link functors functor base classes@endlink.
*/
template<typename _Arg, typename _Result>
struct unary_function
{
/// @c argument_type is the type of the argument
typedef _Arg argument_type;
/// @c result_type is the return type
typedef _Result result_type;
};
/**
* This is one of the @link functors functor base classes@endlink.
*/
template<typename _Arg1, typename _Arg2, typename _Result>
struct binary_function
{
/// @c first_argument_type is the type of the first argument
typedef _Arg1 first_argument_type;
/// @c second_argument_type is the type of the second argument
typedef _Arg2 second_argument_type;
/// @c result_type is the return type
typedef _Result result_type;
};
/** @} */
// 20.3.2 arithmetic
/** @defgroup arithmetic_functors Arithmetic Classes
* @ingroup functors
*
* Because basic math often needs to be done during an algorithm,
* the library provides functors for those operations. See the
* documentation for @link functors the base classes@endlink
* for examples of their use.
*
* @{
*/
#if __cplusplus > 201103L
struct __is_transparent; // undefined
template<typename _Tp = void>
struct plus;
template<typename _Tp = void>
struct minus;
template<typename _Tp = void>
struct multiplies;
template<typename _Tp = void>
struct divides;
template<typename _Tp = void>
struct modulus;
template<typename _Tp = void>
struct negate;
#endif
# 164 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
/// One of the @link arithmetic_functors math functors@endlink.
template<typename _Tp>
struct plus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x + __y; }
};
/// One of the @link arithmetic_functors math functors@endlink.
template<typename _Tp>
struct minus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x - __y; }
};
/// One of the @link arithmetic_functors math functors@endlink.
template<typename _Tp>
struct multiplies : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x * __y; }
};
/// One of the @link arithmetic_functors math functors@endlink.
template<typename _Tp>
struct divides : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x / __y; }
};
/// One of the @link arithmetic_functors math functors@endlink.
template<typename _Tp>
struct modulus : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x % __y; }
};
/// One of the @link arithmetic_functors math functors@endlink.
template<typename _Tp>
struct negate : public unary_function<_Tp, _Tp>
{
_Tp
operator()(const _Tp& __x) const
{ return -__x; }
};
#if __cplusplus > 201103L
#define __cpp_lib_transparent_operators 201210
//#define __cpp_lib_generic_associative_lookup 201304
template<>
struct plus<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) + std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link arithmetic_functors math functors@endlink.
template<>
struct minus<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) - std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link arithmetic_functors math functors@endlink.
template<>
struct multiplies<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) * std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link arithmetic_functors math functors@endlink.
template<>
struct divides<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) / std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link arithmetic_functors math functors@endlink.
template<>
struct modulus<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) % std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link arithmetic_functors math functors@endlink.
template<>
struct negate<void>
{
template <typename _Tp>
auto
operator()(_Tp&& __t) const
noexcept(noexcept(-std::forward<_Tp>(__t)))
-> decltype(-std::forward<_Tp>(__t))
{ return -std::forward<_Tp>(__t); }
typedef __is_transparent is_transparent;
};
#endif
# 307 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
/** @} */
// 20.3.3 comparisons
/** @defgroup comparison_functors Comparison Classes
* @ingroup functors
*
* The library provides six wrapper functors for all the basic comparisons
* in C++, like @c <.
*
* @{
*/
#if __cplusplus > 201103L
template<typename _Tp = void>
struct equal_to;
template<typename _Tp = void>
struct not_equal_to;
template<typename _Tp = void>
struct greater;
template<typename _Tp = void>
struct less;
template<typename _Tp = void>
struct greater_equal;
template<typename _Tp = void>
struct less_equal;
#endif
# 337 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
/// One of the @link comparison_functors comparison functors@endlink.
template<typename _Tp>
struct equal_to : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x == __y; }
};
/// One of the @link comparison_functors comparison functors@endlink.
template<typename _Tp>
struct not_equal_to : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x != __y; }
};
/// One of the @link comparison_functors comparison functors@endlink.
template<typename _Tp>
struct greater : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x > __y; }
};
/// One of the @link comparison_functors comparison functors@endlink.
template<typename _Tp>
struct less : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x < __y; }
};
/// One of the @link comparison_functors comparison functors@endlink.
template<typename _Tp>
struct greater_equal : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x >= __y; }
};
/// One of the @link comparison_functors comparison functors@endlink.
template<typename _Tp>
struct less_equal : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x <= __y; }
};
#if __cplusplus > 201103L
/// One of the @link comparison_functors comparison functors@endlink.
template<>
struct equal_to<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) == std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link comparison_functors comparison functors@endlink.
template<>
struct not_equal_to<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) != std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link comparison_functors comparison functors@endlink.
template<>
struct greater<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) > std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link comparison_functors comparison functors@endlink.
template<>
struct less<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) < std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link comparison_functors comparison functors@endlink.
template<>
struct greater_equal<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link comparison_functors comparison functors@endlink.
template<>
struct less_equal<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
#endif
# 477 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
/** @} */
// 20.3.4 logical operations
/** @defgroup logical_functors Boolean Operations Classes
* @ingroup functors
*
* Here are wrapper functors for Boolean operations: @c &&, @c ||,
* and @c !.
*
* @{
*/
#if __cplusplus > 201103L
template<typename _Tp = void>
struct logical_and;
template<typename _Tp = void>
struct logical_or;
template<typename _Tp = void>
struct logical_not;
#endif
# 498 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
/// One of the @link logical_functors Boolean operations functors@endlink.
template<typename _Tp>
struct logical_and : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x && __y; }
};
/// One of the @link logical_functors Boolean operations functors@endlink.
template<typename _Tp>
struct logical_or : public binary_function<_Tp, _Tp, bool>
{
bool
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x || __y; }
};
/// One of the @link logical_functors Boolean operations functors@endlink.
template<typename _Tp>
struct logical_not : public unary_function<_Tp, bool>
{
bool
operator()(const _Tp& __x) const
{ return !__x; }
};
#if __cplusplus > 201103L
/// One of the @link logical_functors Boolean operations functors@endlink.
template<>
struct logical_and<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) && std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link logical_functors Boolean operations functors@endlink.
template<>
struct logical_or<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) || std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
/// One of the @link logical_functors Boolean operations functors@endlink.
template<>
struct logical_not<void>
{
template <typename _Tp>
auto
operator()(_Tp&& __t) const
noexcept(noexcept(!std::forward<_Tp>(__t)))
-> decltype(!std::forward<_Tp>(__t))
{ return !std::forward<_Tp>(__t); }
typedef __is_transparent is_transparent;
};
#endif
# 569 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
/** @} */
#if __cplusplus > 201103L
template<typename _Tp = void>
struct bit_and;
template<typename _Tp = void>
struct bit_or;
template<typename _Tp = void>
struct bit_xor;
template<typename _Tp = void>
struct bit_not;
#endif
# 584 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 660. Missing Bitwise Operations.
template<typename _Tp>
struct bit_and : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x & __y; }
};
template<typename _Tp>
struct bit_or : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x | __y; }
};
template<typename _Tp>
struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
{
_Tp
operator()(const _Tp& __x, const _Tp& __y) const
{ return __x ^ __y; }
};
template<typename _Tp>
struct bit_not : public unary_function<_Tp, _Tp>
{
_Tp
operator()(const _Tp& __x) const
{ return ~__x; }
};
#if __cplusplus > 201103L
template <>
struct bit_and<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) & std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template <>
struct bit_or<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) | std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template <>
struct bit_xor<void>
{
template <typename _Tp, typename _Up>
auto
operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)))
-> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))
{ return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); }
typedef __is_transparent is_transparent;
};
template <>
struct bit_not<void>
{
template <typename _Tp>
auto
operator()(_Tp&& __t) const
noexcept(noexcept(~std::forward<_Tp>(__t)))
-> decltype(~std::forward<_Tp>(__t))
{ return ~std::forward<_Tp>(__t); }
typedef __is_transparent is_transparent;
};
#endif
# 672 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
// 20.3.5 negators
/** @defgroup negators Negators
* @ingroup functors
*
* The functions @c not1 and @c not2 each take a predicate functor
* and return an instance of @c unary_negate or
* @c binary_negate, respectively. These classes are functors whose
* @c operator() performs the stored predicate function and then returns
* the negation of the result.
*
* For example, given a vector of integers and a trivial predicate,
* \code
* struct IntGreaterThanThree
* : public std::unary_function<int, bool>
* {
* bool operator() (int x) { return x > 3; }
* };
*
* std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
* \endcode
* The call to @c find_if will locate the first index (i) of @c v for which
* <code>!(v[i] > 3)</code> is true.
*
* The not1/unary_negate combination works on predicates taking a single
* argument. The not2/binary_negate combination works on predicates which
* take two arguments.
*
* @{
*/
/// One of the @link negators negation functors@endlink.
template<typename _Predicate>
class unary_negate
: public unary_function<typename _Predicate::argument_type, bool>
{
protected:
_Predicate _M_pred;
public:
explicit
unary_negate(const _Predicate& __x) : _M_pred(__x) { }
bool
operator()(const typename _Predicate::argument_type& __x) const
{ return !_M_pred(__x); }
};
/// One of the @link negators negation functors@endlink.
template<typename _Predicate>
inline unary_negate<_Predicate>
not1(const _Predicate& __pred)
{ return unary_negate<_Predicate>(__pred); }
/// One of the @link negators negation functors@endlink.
template<typename _Predicate>
class binary_negate
: public binary_function<typename _Predicate::first_argument_type,
typename _Predicate::second_argument_type, bool>
{
protected:
_Predicate _M_pred;
public:
explicit
binary_negate(const _Predicate& __x) : _M_pred(__x) { }
bool
operator()(const typename _Predicate::first_argument_type& __x,
const typename _Predicate::second_argument_type& __y) const
{ return !_M_pred(__x, __y); }
};
/// One of the @link negators negation functors@endlink.
template<typename _Predicate>
inline binary_negate<_Predicate>
not2(const _Predicate& __pred)
{ return binary_negate<_Predicate>(__pred); }
/** @} */
// 20.3.7 adaptors pointers functions
/** @defgroup pointer_adaptors Adaptors for pointers to functions
* @ingroup functors
*
* The advantage of function objects over pointers to functions is that
* the objects in the standard library declare nested typedefs describing
* their argument and result types with uniform names (e.g., @c result_type
* from the base classes @c unary_function and @c binary_function).
* Sometimes those typedefs are required, not just optional.
*
* Adaptors are provided to turn pointers to unary (single-argument) and
* binary (double-argument) functions into function objects. The
* long-winded functor @c pointer_to_unary_function is constructed with a
* function pointer @c f, and its @c operator() called with argument @c x
* returns @c f(x). The functor @c pointer_to_binary_function does the same
* thing, but with a double-argument @c f and @c operator().
*
* The function @c ptr_fun takes a pointer-to-function @c f and constructs
* an instance of the appropriate functor.
*
* @{
*/
/// One of the @link pointer_adaptors adaptors for function pointers@endlink.
template<typename _Arg, typename _Result>
class pointer_to_unary_function : public unary_function<_Arg, _Result>
{
protected:
_Result (*_M_ptr)(_Arg);
public:
pointer_to_unary_function() { }
explicit
pointer_to_unary_function(_Result (*__x)(_Arg))
: _M_ptr(__x) { }
_Result
operator()(_Arg __x) const
{ return _M_ptr(__x); }
};
/// One of the @link pointer_adaptors adaptors for function pointers@endlink.
template<typename _Arg, typename _Result>
inline pointer_to_unary_function<_Arg, _Result>
ptr_fun(_Result (*__x)(_Arg))
{ return pointer_to_unary_function<_Arg, _Result>(__x); }
/// One of the @link pointer_adaptors adaptors for function pointers@endlink.
template<typename _Arg1, typename _Arg2, typename _Result>
class pointer_to_binary_function
: public binary_function<_Arg1, _Arg2, _Result>
{
protected:
_Result (*_M_ptr)(_Arg1, _Arg2);
public:
pointer_to_binary_function() { }
explicit
pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
: _M_ptr(__x) { }
_Result
operator()(_Arg1 __x, _Arg2 __y) const
{ return _M_ptr(__x, __y); }
};
/// One of the @link pointer_adaptors adaptors for function pointers@endlink.
template<typename _Arg1, typename _Arg2, typename _Result>
inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
ptr_fun(_Result (*__x)(_Arg1, _Arg2))
{ return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
/** @} */
template<typename _Tp>
struct _Identity
: public unary_function<_Tp,_Tp>
{
_Tp&
operator()(_Tp& __x) const
{ return __x; }
const _Tp&
operator()(const _Tp& __x) const
{ return __x; }
};
template<typename _Pair>
struct _Select1st
: public unary_function<_Pair, typename _Pair::first_type>
{
typename _Pair::first_type&
operator()(_Pair& __x) const
{ return __x.first; }
const typename _Pair::first_type&
operator()(const _Pair& __x) const
{ return __x.first; }
#if __cplusplus >= 201103L
template<typename _Pair2>
typename _Pair2::first_type&
operator()(_Pair2& __x) const
{ return __x.first; }
template<typename _Pair2>
const typename _Pair2::first_type&
operator()(const _Pair2& __x) const
{ return __x.first; }
#endif
# 861 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
};
template<typename _Pair>
struct _Select2nd
: public unary_function<_Pair, typename _Pair::second_type>
{
typename _Pair::second_type&
operator()(_Pair& __x) const
{ return __x.second; }
const typename _Pair::second_type&
operator()(const _Pair& __x) const
{ return __x.second; }
};
// 20.3.8 adaptors pointers members
/** @defgroup memory_adaptors Adaptors for pointers to members
* @ingroup functors
*
* There are a total of 8 = 2^3 function objects in this family.
* (1) Member functions taking no arguments vs member functions taking
* one argument.
* (2) Call through pointer vs call through reference.
* (3) Const vs non-const member function.
*
* All of this complexity is in the function objects themselves. You can
* ignore it by using the helper function mem_fun and mem_fun_ref,
* which create whichever type of adaptor is appropriate.
*
* @{
*/
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp>
class mem_fun_t : public unary_function<_Tp*, _Ret>
{
public:
explicit
mem_fun_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) { }
_Ret
operator()(_Tp* __p) const
{ return (__p->*_M_f)(); }
private:
_Ret (_Tp::*_M_f)();
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp>
class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
{
public:
explicit
const_mem_fun_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp* __p) const
{ return (__p->*_M_f)(); }
private:
_Ret (_Tp::*_M_f)() const;
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp>
class mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
mem_fun_ref_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) { }
_Ret
operator()(_Tp& __r) const
{ return (__r.*_M_f)(); }
private:
_Ret (_Tp::*_M_f)();
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp>
class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit
const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp& __r) const
{ return (__r.*_M_f)(); }
private:
_Ret (_Tp::*_M_f)() const;
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
{
public:
explicit
mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) { }
_Ret
operator()(_Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg);
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp* __p, _Arg __x) const
{ return (__p->*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp, typename _Arg>
class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) { }
_Ret
operator()(_Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg);
};
/// One of the @link memory_adaptors adaptors for member
/// pointers@endlink.
template<typename _Ret, typename _Tp, typename _Arg>
class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit
const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) { }
_Ret
operator()(const _Tp& __r, _Arg __x) const
{ return (__r.*_M_f)(__x); }
private:
_Ret (_Tp::*_M_f)(_Arg) const;
};
// Mem_fun adaptor helper functions. There are only two:
// mem_fun and mem_fun_ref.
template<typename _Ret, typename _Tp>
inline mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)())
{ return mem_fun_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp>
inline const_mem_fun_t<_Ret, _Tp>
mem_fun(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp>
inline mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)())
{ return mem_fun_ref_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp>
inline const_mem_fun_ref_t<_Ret, _Tp>
mem_fun_ref(_Ret (_Tp::*__f)() const)
{ return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_t<_Ret, _Tp, _Arg>
mem_fun(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
{ return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
template<typename _Ret, typename _Tp, typename _Arg>
inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
{ return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
/** @} */
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED
#if 0 /* expanded by -frewrite-includes */
# include <backward/binders.h>
#endif /* expanded by -frewrite-includes */
# 1084 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/backward/binders.h" 1 3
// Functor implementations -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996-1998
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file backward/binders.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{functional}
*/
#ifndef _BACKWARD_BINDERS_H
#define _BACKWARD_BINDERS_H 1
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// 20.3.6 binders
/** @defgroup binders Binder Classes
* @ingroup functors
*
* Binders turn functions/functors with two arguments into functors
* with a single argument, storing an argument to be applied later.
* For example, a variable @c B of type @c binder1st is constructed
* from a functor @c f and an argument @c x. Later, B's @c
* operator() is called with a single argument @c y. The return
* value is the value of @c f(x,y). @c B can be @a called with
* various arguments (y1, y2, ...) and will in turn call @c
* f(x,y1), @c f(x,y2), ...
*
* The function @c bind1st is provided to save some typing. It takes the
* function and an argument as parameters, and returns an instance of
* @c binder1st.
*
* The type @c binder2nd and its creator function @c bind2nd do the same
* thing, but the stored argument is passed as the second parameter instead
* of the first, e.g., @c bind2nd(std::minus<float>(),1.3) will create a
* functor whose @c operator() accepts a floating-point number, subtracts
* 1.3 from it, and returns the result. (If @c bind1st had been used,
* the functor would perform <em>1.3 - x</em> instead.
*
* Creator-wrapper functions like @c bind1st are intended to be used in
* calling algorithms. Their return values will be temporary objects.
* (The goal is to not require you to type names like
* @c std::binder1st<std::plus<int>> for declaring a variable to hold the
* return value from @c bind1st(std::plus<int>(),5).
*
* These become more useful when combined with the composition functions.
*
* These functions are deprecated in C++11 and can be replaced by
* @c std::bind (or @c std::tr1::bind) which is more powerful and flexible,
* supporting functions with any number of arguments. Uses of @c bind1st
* can be replaced by @c std::bind(f, x, std::placeholders::_1) and
* @c bind2nd by @c std::bind(f, std::placeholders::_1, x).
* @{
*/
/// One of the @link binders binder functors@endlink.
template<typename _Operation>
class binder1st
: public unary_function<typename _Operation::second_argument_type,
typename _Operation::result_type>
{
protected:
_Operation op;
typename _Operation::first_argument_type value;
public:
binder1st(const _Operation& __x,
const typename _Operation::first_argument_type& __y)
: op(__x), value(__y) { }
typename _Operation::result_type
operator()(const typename _Operation::second_argument_type& __x) const
{ return op(value, __x); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 109. Missing binders for non-const sequence elements
typename _Operation::result_type
operator()(typename _Operation::second_argument_type& __x) const
{ return op(value, __x); }
} _GLIBCXX_DEPRECATED;
/// One of the @link binders binder functors@endlink.
template<typename _Operation, typename _Tp>
inline binder1st<_Operation>
bind1st(const _Operation& __fn, const _Tp& __x)
{
typedef typename _Operation::first_argument_type _Arg1_type;
return binder1st<_Operation>(__fn, _Arg1_type(__x));
}
/// One of the @link binders binder functors@endlink.
template<typename _Operation>
class binder2nd
: public unary_function<typename _Operation::first_argument_type,
typename _Operation::result_type>
{
protected:
_Operation op;
typename _Operation::second_argument_type value;
public:
binder2nd(const _Operation& __x,
const typename _Operation::second_argument_type& __y)
: op(__x), value(__y) { }
typename _Operation::result_type
operator()(const typename _Operation::first_argument_type& __x) const
{ return op(__x, value); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 109. Missing binders for non-const sequence elements
typename _Operation::result_type
operator()(typename _Operation::first_argument_type& __x) const
{ return op(__x, value); }
} _GLIBCXX_DEPRECATED;
/// One of the @link binders binder functors@endlink.
template<typename _Operation, typename _Tp>
inline binder2nd<_Operation>
bind2nd(const _Operation& __fn, const _Tp& __x)
{
typedef typename _Operation::second_argument_type _Arg2_type;
return binder2nd<_Operation>(__fn, _Arg2_type(__x));
}
/** @} */
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif /* _BACKWARD_BINDERS_H */
# 177 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/backward/binders.h" 3
# 1085 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 2 3
#endif
# 1086 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
#endif /* _STL_FUNCTION_H */
# 1088 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_function.h" 3
# 77 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <bits/uses_allocator.h>
#endif /* expanded by -frewrite-includes */
# 77 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 1 3
// Uses-allocator Construction -*- C++ -*-
// Copyright (C) 2010-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
#ifndef _USES_ALLOCATOR_H
#define _USES_ALLOCATOR_H 1
#if __cplusplus < 201103L
#if 0 /* expanded by -frewrite-includes */
# include <bits/c++0x_warning.h>
#endif /* expanded by -frewrite-includes */
# 29 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
# 30 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
#else
# 31 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
#if 0 /* expanded by -frewrite-includes */
#include <type_traits>
#endif /* expanded by -frewrite-includes */
# 32 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/// [allocator.tag]
struct allocator_arg_t { };
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
_GLIBCXX_HAS_NESTED_TYPE(allocator_type)
template<typename _Tp, typename _Alloc,
bool = __has_allocator_type<_Tp>::value>
struct __uses_allocator_helper
: public false_type { };
template<typename _Tp, typename _Alloc>
struct __uses_allocator_helper<_Tp, _Alloc, true>
: public integral_constant<bool, is_convertible<_Alloc,
typename _Tp::allocator_type>::value>
{ };
/// [allocator.uses.trait]
template<typename _Tp, typename _Alloc>
struct uses_allocator
: public integral_constant<bool,
__uses_allocator_helper<_Tp, _Alloc>::value>
{ };
template<typename _Tp, typename _Alloc, typename... _Args>
struct __uses_allocator_arg
: is_constructible<_Tp, _Alloc, _Args...>
{ static_assert( uses_allocator<_Tp, _Alloc>::value, "uses allocator" ); };
struct __uses_alloc_base { };
struct __uses_alloc0 : __uses_alloc_base
{ struct _Anything { _Anything(...) { } } _M_a; };
template<typename _Alloc>
struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; };
template<typename _Alloc>
struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; };
template<bool, typename _Alloc, typename... _Args>
struct __uses_alloc;
template<typename _Tp, typename _Alloc, typename... _Args>
struct __uses_alloc<true, _Tp, _Alloc, _Args...>
: conditional<
is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value,
__uses_alloc1<_Alloc>,
__uses_alloc2<_Alloc>>::type
{ };
template<typename _Tp, typename _Alloc, typename... _Args>
struct __uses_alloc<false, _Tp, _Alloc, _Args...>
: __uses_alloc0 { };
template<typename _Tp, typename _Alloc, typename... _Args>
struct __uses_alloc_impl
: __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>
{ };
template<typename _Tp, typename _Alloc, typename... _Args>
__uses_alloc_impl<_Tp, _Alloc, _Args...>
__use_alloc(const _Alloc& __a)
{
__uses_alloc_impl<_Tp, _Alloc, _Args...> __ret;
__ret._M_a = &__a;
return __ret;
}
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#endif
# 109 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
#endif
# 110 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/uses_allocator.h" 3
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 2 3
#if 0 /* expanded by -frewrite-includes */
# include <type_traits>
#endif /* expanded by -frewrite-includes */
# 78 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
#if 0 /* expanded by -frewrite-includes */
# include <functional>
#endif /* expanded by -frewrite-includes */
# 79 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/memory" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 1 3
// <functional> -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
* Copyright (c) 1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*/
/** @file include/functional
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_FUNCTIONAL
#define _GLIBCXX_FUNCTIONAL 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 47 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 48 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_function.h>
#endif /* expanded by -frewrite-includes */
# 49 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
# 50 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <typeinfo>
#endif /* expanded by -frewrite-includes */
# 53 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
# 54 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <new>
#endif /* expanded by -frewrite-includes */
# 54 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
#if 0 /* expanded by -frewrite-includes */
#include <tuple>
#endif /* expanded by -frewrite-includes */
# 55 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/functional" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/tuple" 1 3
// <tuple> -*- C++ -*-
// Copyright (C) 2007-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file include/tuple
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_TUPLE
#define _GLIBCXX_TUPLE 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 33 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/tuple" 3
#if __cplusplus < 201103L
#if 0 /* expanded by -frewrite-includes */
# include <bits/c++0x_warning.h>
#endif /* expanded by -frewrite-includes */
# 35 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/tuple" 3
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/tuple" 3
#else
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/tuple" 3
#if 0 /* expanded by -frewrite-includes */
#include <utility>
#endif /* expanded by -frewrite-includes */
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/tuple" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 1 3
// <utility> -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/** @file include/utility
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_UTILITY
#define _GLIBCXX_UTILITY 1
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 59 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
/**
* @defgroup utilities Utilities
*
* Components deemed generally useful. Includes pair, tuple,
* forward/move helpers, ratio, function object, metaprogramming and
* type traits, time, date, and memory functions.
*/
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 68 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_relops.h>
#endif /* expanded by -frewrite-includes */
# 69 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_relops.h" 1 3
// std::rel_ops implementation -*- C++ -*-
// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the, 2009 Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Hewlett-Packard Company makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* Copyright (c) 1996,1997
* Silicon Graphics
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation. Silicon Graphics makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
*/
/** @file bits/stl_relops.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{utility}
*
* Inclusion of this file has been removed from
* all of the other STL headers for safety reasons, except std_utility.h.
* For more information, see the thread of about twenty messages starting
* with http://gcc.gnu.org/ml/libstdc++/2001-01/msg00223.html, or
* http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.ambiguous_overloads
*
* Short summary: the rel_ops operators should be avoided for the present.
*/
#ifndef _STL_RELOPS_H
#define _STL_RELOPS_H 1
namespace std _GLIBCXX_VISIBILITY(default)
{
namespace rel_ops
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/** @namespace std::rel_ops
* @brief The generated relational operators are sequestered here.
*/
/**
* @brief Defines @c != for arbitrary types, in terms of @c ==.
* @param __x A thing.
* @param __y Another thing.
* @return __x != __y
*
* This function uses @c == to determine its result.
*/
template <class _Tp>
inline bool
operator!=(const _Tp& __x, const _Tp& __y)
{ return !(__x == __y); }
/**
* @brief Defines @c > for arbitrary types, in terms of @c <.
* @param __x A thing.
* @param __y Another thing.
* @return __x > __y
*
* This function uses @c < to determine its result.
*/
template <class _Tp>
inline bool
operator>(const _Tp& __x, const _Tp& __y)
{ return __y < __x; }
/**
* @brief Defines @c <= for arbitrary types, in terms of @c <.
* @param __x A thing.
* @param __y Another thing.
* @return __x <= __y
*
* This function uses @c < to determine its result.
*/
template <class _Tp>
inline bool
operator<=(const _Tp& __x, const _Tp& __y)
{ return !(__y < __x); }
/**
* @brief Defines @c >= for arbitrary types, in terms of @c <.
* @param __x A thing.
* @param __y Another thing.
* @return __x >= __y
*
* This function uses @c < to determine its result.
*/
template <class _Tp>
inline bool
operator>=(const _Tp& __x, const _Tp& __y)
{ return !(__x < __y); }
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace rel_ops
} // namespace std
#endif /* _STL_RELOPS_H */
# 135 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/bits/stl_relops.h" 3
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 2 3
#if 0 /* expanded by -frewrite-includes */
#include <bits/stl_pair.h>
#endif /* expanded by -frewrite-includes */
# 70 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
# 71 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
#if __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include <bits/move.h>
#endif /* expanded by -frewrite-includes */
# 74 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
# 75 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
#if 0 /* expanded by -frewrite-includes */
#include <initializer_list>
#endif /* expanded by -frewrite-includes */
# 75 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 3
# 1 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 1 3
// std::initializer_list support -*- C++ -*-
// Copyright (C) 2008-2014 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file initializer_list
* This is a Standard C++ Library header.
*/
#ifndef _INITIALIZER_LIST
#define _INITIALIZER_LIST
#if 0 /* expanded by -frewrite-includes */
#pragma GCC system_header
#endif /* expanded by -frewrite-includes */
# 34 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
#if __cplusplus < 201103L
#if 0 /* expanded by -frewrite-includes */
# include <bits/c++0x_warning.h>
#endif /* expanded by -frewrite-includes */
# 36 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
# 37 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
#else // C++0x
# 38 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
#pragma GCC visibility push(default)
#if 0 /* expanded by -frewrite-includes */
#include <bits/c++config.h>
#endif /* expanded by -frewrite-includes */
# 41 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
# 42 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
namespace std
{
/// initializer_list
template<class _E>
class initializer_list
{
public:
typedef _E value_type;
typedef const _E& reference;
typedef const _E& const_reference;
typedef size_t size_type;
typedef const _E* iterator;
typedef const _E* const_iterator;
private:
iterator _M_array;
size_type _M_len;
// The compiler can call a private constructor.
constexpr initializer_list(const_iterator __a, size_type __l)
: _M_array(__a), _M_len(__l) { }
public:
constexpr initializer_list() noexcept
: _M_array(0), _M_len(0) { }
// Number of elements.
constexpr size_type
size() const noexcept { return _M_len; }
// First element.
constexpr const_iterator
begin() const noexcept { return _M_array; }
// One past the last element.
constexpr const_iterator
end() const noexcept { return begin() + size(); }
};
/**
* @brief Return an iterator pointing to the first element of
* the initializer_list.
* @param __ils Initializer list.
*/
template<class _Tp>
constexpr const _Tp*
begin(initializer_list<_Tp> __ils) noexcept
{ return __ils.begin(); }
/**
* @brief Return an iterator pointing to one past the last element
* of the initializer_list.
* @param __ils Initializer list.
*/
template<class _Tp>
constexpr const _Tp*
end(initializer_list<_Tp> __ils) noexcept
{ return __ils.end(); }
}
#pragma GCC visibility pop
#endif // C++11
# 106 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
#endif // _INITIALIZER_LIST
# 108 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/initializer_list" 3
# 76 "third-party-buck/gcc-4.9-glibc-2.20-fb/build/libgcc/include/c++/trunk/utility" 2 3
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<class _Tp>
class tuple_size;
template<std::size_t _Int, class _Tp>
class tuple_element;
// Various functions which give std::pair a tuple-like interface.
template<class _Tp1, class _Tp2>
struct tuple_size<std::pair<_Tp1, _Tp2>>
: public integral_constant<std::size_t, 2> { };
template<class _Tp1, class _Tp2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment