forked from ycm-core/YouCompleteMe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
278 changed files
with
6,292 additions
and
3,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
(c) 2015 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGN_UP_HPP | ||
#define BOOST_ALIGN_ALIGN_UP_HPP | ||
|
||
#include <boost/align/detail/align_up.hpp> | ||
#include <boost/align/align_up_forward.hpp> | ||
|
||
namespace boost { | ||
namespace alignment { | ||
|
||
BOOST_CONSTEXPR inline std::size_t align_up(std::size_t value, | ||
std::size_t alignment) BOOST_NOEXCEPT | ||
{ | ||
return (value + alignment - 1) & ~(alignment - 1); | ||
} | ||
|
||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
(c) 2015 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGN_UP_FORWARD_HPP | ||
#define BOOST_ALIGN_ALIGN_UP_FORWARD_HPP | ||
|
||
#include <boost/config.hpp> | ||
#include <cstddef> | ||
|
||
namespace boost { | ||
namespace alignment { | ||
|
||
BOOST_CONSTEXPR std::size_t align_up(std::size_t value, | ||
std::size_t alignment) BOOST_NOEXCEPT; | ||
|
||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
185 changes: 185 additions & 0 deletions
185
cpp/BoostParts/boost/align/aligned_allocator_adaptor.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
/* | ||
(c) 2014-2015 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP | ||
#define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP | ||
|
||
#include <boost/align/detail/addressof.hpp> | ||
#include <boost/align/detail/is_alignment_constant.hpp> | ||
#include <boost/align/detail/max_align.hpp> | ||
#include <boost/align/detail/max_size.hpp> | ||
#include <boost/align/align.hpp> | ||
#include <boost/align/aligned_allocator_adaptor_forward.hpp> | ||
#include <boost/align/alignment_of.hpp> | ||
#include <boost/static_assert.hpp> | ||
#include <new> | ||
|
||
#if !defined(BOOST_NO_CXX11_ALLOCATOR) | ||
#include <memory> | ||
#endif | ||
|
||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) | ||
#include <utility> | ||
#endif | ||
|
||
namespace boost { | ||
namespace alignment { | ||
|
||
template<class Allocator, std::size_t Alignment> | ||
class aligned_allocator_adaptor | ||
: public Allocator { | ||
BOOST_STATIC_ASSERT(detail:: | ||
is_alignment_constant<Alignment>::value); | ||
|
||
#if !defined(BOOST_NO_CXX11_ALLOCATOR) | ||
typedef std::allocator_traits<Allocator> traits; | ||
|
||
typedef typename traits:: | ||
template rebind_alloc<char> char_alloc; | ||
|
||
typedef typename traits:: | ||
template rebind_traits<char> char_traits; | ||
|
||
typedef typename char_traits::pointer char_ptr; | ||
#else | ||
typedef typename Allocator:: | ||
template rebind<char>::other char_alloc; | ||
|
||
typedef typename char_alloc::pointer char_ptr; | ||
#endif | ||
|
||
public: | ||
#if !defined(BOOST_NO_CXX11_ALLOCATOR) | ||
typedef typename traits::value_type value_type; | ||
typedef typename traits::size_type size_type; | ||
#else | ||
typedef typename Allocator::value_type value_type; | ||
typedef typename Allocator::size_type size_type; | ||
#endif | ||
|
||
typedef value_type* pointer; | ||
typedef const value_type* const_pointer; | ||
typedef void* void_pointer; | ||
typedef const void* const_void_pointer; | ||
typedef std::ptrdiff_t difference_type; | ||
|
||
private: | ||
enum { | ||
min_align = detail::max_size<Alignment, | ||
detail::max_align<value_type, char_ptr>::value>::value | ||
}; | ||
|
||
public: | ||
template<class U> | ||
struct rebind { | ||
#if !defined(BOOST_NO_CXX11_ALLOCATOR) | ||
typedef aligned_allocator_adaptor<typename traits:: | ||
template rebind_alloc<U>, Alignment> other; | ||
#else | ||
typedef aligned_allocator_adaptor<typename Allocator:: | ||
template rebind<U>::other, Alignment> other; | ||
#endif | ||
}; | ||
|
||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) | ||
aligned_allocator_adaptor() = default; | ||
#else | ||
aligned_allocator_adaptor() | ||
: Allocator() { | ||
} | ||
#endif | ||
|
||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) | ||
template<class A> | ||
explicit aligned_allocator_adaptor(A&& alloc) BOOST_NOEXCEPT | ||
: Allocator(std::forward<A>(alloc)) { | ||
} | ||
#else | ||
template<class A> | ||
explicit aligned_allocator_adaptor(const A& alloc) | ||
BOOST_NOEXCEPT | ||
: Allocator(alloc) { | ||
} | ||
#endif | ||
|
||
template<class U> | ||
aligned_allocator_adaptor(const aligned_allocator_adaptor<U, | ||
Alignment>& other) BOOST_NOEXCEPT | ||
: Allocator(other.base()) { | ||
} | ||
|
||
Allocator& base() BOOST_NOEXCEPT { | ||
return static_cast<Allocator&>(*this); | ||
} | ||
|
||
const Allocator& base() const BOOST_NOEXCEPT { | ||
return static_cast<const Allocator&>(*this); | ||
} | ||
|
||
pointer allocate(size_type size) { | ||
std::size_t s = size * sizeof(value_type); | ||
std::size_t n = s + min_align - 1; | ||
char_alloc a(base()); | ||
char_ptr p = a.allocate(sizeof p + n); | ||
void* r = detail::addressof(*p) + sizeof p; | ||
(void)align(min_align, s, r, n); | ||
::new(static_cast<void*>(static_cast<char_ptr*>(r) - | ||
1)) char_ptr(p); | ||
return static_cast<pointer>(r); | ||
} | ||
|
||
pointer allocate(size_type size, const_void_pointer hint) { | ||
std::size_t s = size * sizeof(value_type); | ||
std::size_t n = s + min_align - 1; | ||
char_ptr h = char_ptr(); | ||
if (hint) { | ||
h = *(static_cast<const char_ptr*>(hint) - 1); | ||
} | ||
char_alloc a(base()); | ||
#if !defined(BOOST_NO_CXX11_ALLOCATOR) | ||
char_ptr p = char_traits::allocate(a, sizeof p + n, h); | ||
#else | ||
char_ptr p = a.allocate(sizeof p + n, h); | ||
#endif | ||
void* r = detail::addressof(*p) + sizeof p; | ||
(void)align(min_align, s, r, n); | ||
::new(static_cast<void*>(static_cast<char_ptr*>(r) - | ||
1)) char_ptr(p); | ||
return static_cast<pointer>(r); | ||
} | ||
|
||
void deallocate(pointer ptr, size_type size) { | ||
char_ptr* p = reinterpret_cast<char_ptr*>(ptr) - 1; | ||
char_ptr r = *p; | ||
p->~char_ptr(); | ||
char_alloc a(base()); | ||
a.deallocate(r, sizeof r + size * sizeof(value_type) + | ||
min_align - 1); | ||
} | ||
}; | ||
|
||
template<class A1, class A2, std::size_t Alignment> | ||
inline bool operator==(const aligned_allocator_adaptor<A1, | ||
Alignment>& a, const aligned_allocator_adaptor<A2, | ||
Alignment>& b) BOOST_NOEXCEPT | ||
{ | ||
return a.base() == b.base(); | ||
} | ||
|
||
template<class A1, class A2, std::size_t Alignment> | ||
inline bool operator!=(const aligned_allocator_adaptor<A1, | ||
Alignment>& a, const aligned_allocator_adaptor<A2, | ||
Alignment>& b) BOOST_NOEXCEPT | ||
{ | ||
return !(a == b); | ||
} | ||
|
||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
23 changes: 23 additions & 0 deletions
23
cpp/BoostParts/boost/align/aligned_allocator_adaptor_forward.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
(c) 2014 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_FORWARD_HPP | ||
#define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_FORWARD_HPP | ||
|
||
#include <cstddef> | ||
|
||
namespace boost { | ||
namespace alignment { | ||
|
||
template<class Allocator, std::size_t Alignment = 1> | ||
class aligned_allocator_adaptor; | ||
|
||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
(c) 2014-2015 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP | ||
#define BOOST_ALIGN_ALIGNMENT_OF_HPP | ||
|
||
#include <boost/align/detail/element_type.hpp> | ||
#include <boost/align/alignment_of_forward.hpp> | ||
|
||
#if defined(BOOST_MSVC) | ||
#include <boost/align/detail/alignment_of_msvc.hpp> | ||
#elif defined(__GNUC__) && defined(__unix__) && !defined(__LP64__) | ||
#include <boost/align/detail/alignment_of.hpp> | ||
#elif defined(BOOST_CLANG) && !defined(__x86_64__) | ||
#include <boost/align/detail/alignment_of.hpp> | ||
#elif !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) | ||
#include <boost/align/detail/alignment_of_cxx11.hpp> | ||
#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) | ||
#include <boost/align/detail/alignment_of_gcc.hpp> | ||
#elif defined(__CODEGEARC__) | ||
#include <boost/align/detail/alignment_of_codegear.hpp> | ||
#elif defined(BOOST_CLANG) | ||
#include <boost/align/detail/alignment_of_clang.hpp> | ||
#elif __GNUC__ > 4 | ||
#include <boost/align/detail/alignment_of_gcc.hpp> | ||
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) | ||
#include <boost/align/detail/alignment_of_gcc.hpp> | ||
#else | ||
#include <boost/align/detail/alignment_of.hpp> | ||
#endif | ||
|
||
namespace boost { | ||
namespace alignment { | ||
|
||
template<class T> | ||
struct alignment_of | ||
: detail::alignment_of<typename | ||
detail::element_type<T>::type>::type { | ||
}; | ||
|
||
#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) | ||
template<class T> | ||
constexpr std::size_t alignment_of_v = alignment_of<T>::value; | ||
#endif | ||
|
||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
(c) 2014 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP | ||
#define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP | ||
|
||
namespace boost { | ||
namespace alignment { | ||
|
||
template<class T> | ||
struct alignment_of; | ||
|
||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
(c) 2014 Glen Joseph Fernandes | ||
<glenjofe -at- gmail.com> | ||
Distributed under the Boost Software | ||
License, Version 1.0. | ||
http://boost.org/LICENSE_1_0.txt | ||
*/ | ||
#ifndef BOOST_ALIGN_DETAIL_ADDRESSOF_HPP | ||
#define BOOST_ALIGN_DETAIL_ADDRESSOF_HPP | ||
|
||
#include <boost/config.hpp> | ||
|
||
#if !defined(BOOST_NO_CXX11_ADDRESSOF) | ||
#include <memory> | ||
#else | ||
#include <boost/core/addressof.hpp> | ||
#endif | ||
|
||
namespace boost { | ||
namespace alignment { | ||
namespace detail { | ||
|
||
#if !defined(BOOST_NO_CXX11_ADDRESSOF) | ||
using std::addressof; | ||
#else | ||
using boost::addressof; | ||
#endif | ||
|
||
} /* .detail */ | ||
} /* .alignment */ | ||
} /* .boost */ | ||
|
||
#endif |
Oops, something went wrong.