Skip to content

Commit 05014bf

Browse files
authored
bump deps (#240)
* bump deps * boost 1.82.0 * rapid json * -lite libs * google test(it seems latest version targeting c++14) * robinhood hashing * fmt 10.0.0 * fix boost patch
1 parent b776a46 commit 05014bf

13 files changed

+53
-35
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
From 857dc932fc32d3a1d30abac7724565812b446cd2 Mon Sep 17 00:00:00 2001
1+
From d924c3bf4d83e9ef3ce66a6ac1e80ef1cb7cc4ca Mon Sep 17 00:00:00 2001
22
From: Ruslan Morozov <ruslan.y.morozov@gmail.com>
3-
Date: Thu, 8 Dec 2022 21:11:49 +0300
4-
Subject: [PATCH] fix skip install rules
3+
Date: Sat, 3 Jun 2023 12:21:15 +0300
4+
Subject: [PATCH] [PATCH] fix skip install rules
55

66
---
77
include/BoostRoot.cmake | 2 +-
88
1 file changed, 1 insertion(+), 1 deletion(-)
99

1010
diff --git a/tools/cmake/include/BoostRoot.cmake b/tools/cmake/include/BoostRoot.cmake
11-
index f2a51e1..a37f14d 100644
11+
index e93f907..f0380b3 100644
1212
--- a/tools/cmake/include/BoostRoot.cmake
1313
+++ b/tools/cmake/include/BoostRoot.cmake
14-
@@ -90,7 +90,7 @@ else()
14+
@@ -108,7 +108,7 @@ else()
1515
endif()
1616

1717
set(BUILD_TESTING OFF)
18-
- set(CMAKE_SKIP_INSTALL_RULES ON)
19-
+ set(CMAKE_SKIP_INSTALL_RULES OFF)
18+
- set(BOOST_SKIP_INSTALL_RULES ON)
19+
+ set(BOOST_SKIP_INSTALL_RULES OFF)
2020

2121
endif()
2222

2323
--
24-
2.37.1 (Apple Git-137.1)
24+
2.39.2 (Apple Git-143)
2525

src/expression_evaluator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ Result ParseCallParamsImpl(const T& args, const P& params, bool& isSucceeded)
424424
int firstMandatoryIdx = -1;
425425
int prevNotFound = -1;
426426
int foundKwArgs = 0;
427+
(void)foundKwArgs; // extremely odd bug in clang warning
428+
// Wunused-but-set-variable
427429

428430
// Find all provided keyword args
429431
for (auto& argInfo : args)
@@ -441,7 +443,7 @@ Result ParseCallParamsImpl(const T& args, const P& params, bool& isSucceeded)
441443
{
442444
result.args[argInfo.name] = p->second;
443445
argsInfo[argIdx].state = Keyword;
444-
++ foundKwArgs;
446+
++foundKwArgs;
445447
}
446448
else
447449
{

src/robin_hood.h

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
// see https://semver.org/
3737
#define ROBIN_HOOD_VERSION_MAJOR 3 // for incompatible API changes
3838
#define ROBIN_HOOD_VERSION_MINOR 11 // for adding functionality in a backwards-compatible manner
39-
#define ROBIN_HOOD_VERSION_PATCH 3 // for backwards-compatible bug fixes
39+
#define ROBIN_HOOD_VERSION_PATCH 5 // for backwards-compatible bug fixes
4040

4141
#include <algorithm>
4242
#include <cstdlib>
@@ -206,7 +206,7 @@ static Counts& counts() {
206206

207207
// workaround missing "is_trivially_copyable" in g++ < 5.0
208208
// See https://stackoverflow.com/a/31798726/48181
209-
#if defined(__GNUC__) && __GNUC__ < 5
209+
#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
210210
# define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) __has_trivial_copy(__VA_ARGS__)
211211
#else
212212
# define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable<__VA_ARGS__>::value
@@ -1820,6 +1820,12 @@ class Table
18201820
InsertionState::key_found != idxAndState.second);
18211821
}
18221822

1823+
template <typename... Args>
1824+
iterator emplace_hint(const_iterator position, Args&&... args) {
1825+
(void)position;
1826+
return emplace(std::forward<Args>(args)...).first;
1827+
}
1828+
18231829
template <typename... Args>
18241830
std::pair<iterator, bool> try_emplace(const key_type& key, Args&&... args) {
18251831
return try_emplace_impl(key, std::forward<Args>(args)...);
@@ -1831,16 +1837,15 @@ class Table
18311837
}
18321838

18331839
template <typename... Args>
1834-
std::pair<iterator, bool> try_emplace(const_iterator hint, const key_type& key,
1835-
Args&&... args) {
1840+
iterator try_emplace(const_iterator hint, const key_type& key, Args&&... args) {
18361841
(void)hint;
1837-
return try_emplace_impl(key, std::forward<Args>(args)...);
1842+
return try_emplace_impl(key, std::forward<Args>(args)...).first;
18381843
}
18391844

18401845
template <typename... Args>
1841-
std::pair<iterator, bool> try_emplace(const_iterator hint, key_type&& key, Args&&... args) {
1846+
iterator try_emplace(const_iterator hint, key_type&& key, Args&&... args) {
18421847
(void)hint;
1843-
return try_emplace_impl(std::move(key), std::forward<Args>(args)...);
1848+
return try_emplace_impl(std::move(key), std::forward<Args>(args)...).first;
18441849
}
18451850

18461851
template <typename Mapped>
@@ -1854,27 +1859,36 @@ class Table
18541859
}
18551860

18561861
template <typename Mapped>
1857-
std::pair<iterator, bool> insert_or_assign(const_iterator hint, const key_type& key,
1858-
Mapped&& obj) {
1862+
iterator insert_or_assign(const_iterator hint, const key_type& key, Mapped&& obj) {
18591863
(void)hint;
1860-
return insertOrAssignImpl(key, std::forward<Mapped>(obj));
1864+
return insertOrAssignImpl(key, std::forward<Mapped>(obj)).first;
18611865
}
18621866

18631867
template <typename Mapped>
1864-
std::pair<iterator, bool> insert_or_assign(const_iterator hint, key_type&& key, Mapped&& obj) {
1868+
iterator insert_or_assign(const_iterator hint, key_type&& key, Mapped&& obj) {
18651869
(void)hint;
1866-
return insertOrAssignImpl(std::move(key), std::forward<Mapped>(obj));
1870+
return insertOrAssignImpl(std::move(key), std::forward<Mapped>(obj)).first;
18671871
}
18681872

18691873
std::pair<iterator, bool> insert(const value_type& keyval) {
18701874
ROBIN_HOOD_TRACE(this)
18711875
return emplace(keyval);
18721876
}
18731877

1878+
iterator insert(const_iterator hint, const value_type& keyval) {
1879+
(void)hint;
1880+
return emplace(keyval).first;
1881+
}
1882+
18741883
std::pair<iterator, bool> insert(value_type&& keyval) {
18751884
return emplace(std::move(keyval));
18761885
}
18771886

1887+
iterator insert(const_iterator hint, value_type&& keyval) {
1888+
(void)hint;
1889+
return emplace(std::move(keyval)).first;
1890+
}
1891+
18781892
// Returns 1 if key is found, 0 otherwise.
18791893
size_t count(const key_type& key) const { // NOLINT(modernize-use-nodiscard)
18801894
ROBIN_HOOD_TRACE(this)
@@ -2308,13 +2322,14 @@ class Table
23082322

23092323
auto const numElementsWithBuffer = calcNumElementsWithBuffer(max_elements);
23102324

2311-
// calloc also zeroes everything
2325+
// malloc & zero mInfo. Faster than calloc everything.
23122326
auto const numBytesTotal = calcNumBytesTotal(numElementsWithBuffer);
23132327
ROBIN_HOOD_LOG("std::calloc " << numBytesTotal << " = calcNumBytesTotal("
23142328
<< numElementsWithBuffer << ")")
23152329
mKeyVals = reinterpret_cast<Node*>(
2316-
detail::assertNotNull<std::bad_alloc>(std::calloc(1, numBytesTotal)));
2330+
detail::assertNotNull<std::bad_alloc>(std::malloc(numBytesTotal)));
23172331
mInfo = reinterpret_cast<uint8_t*>(mKeyVals + numElementsWithBuffer);
2332+
std::memset(mInfo, 0, numBytesTotal - numElementsWithBuffer * sizeof(Node));
23182333

23192334
// set sentinel
23202335
mInfo[numElementsWithBuffer] = 1;

src/template_parser.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "template_parser.h"
2+
#include "renderer.h"
23
#include <boost/cast.hpp>
34

45
namespace jinja2
@@ -203,7 +204,7 @@ StatementsParser::ParseResult StatementsParser::ParseEndFor(LexScanner&, Stateme
203204
{
204205
auto r = std::static_pointer_cast<ElseBranchStatement>(info.renderer);
205206
r->SetMainBody(info.compositions[0]);
206-
elseRenderer = r;
207+
elseRenderer = std::static_pointer_cast<IRendererBase>(r);
207208

208209
statementsInfo.pop_back();
209210
info = statementsInfo.back();
@@ -246,7 +247,7 @@ StatementsParser::ParseResult StatementsParser::ParseElse(LexScanner& /*lexer*/,
246247
{
247248
auto renderer = std::make_shared<ElseBranchStatement>(ExpressionEvaluatorPtr<>());
248249
StatementInfo statementInfo = StatementInfo::Create(StatementInfo::ElseIfStatement, stmtTok);
249-
statementInfo.renderer = renderer;
250+
statementInfo.renderer = std::static_pointer_cast<IRendererBase>(renderer);
250251
statementsInfo.push_back(statementInfo);
251252
return ParseResult();
252253
}
@@ -262,7 +263,7 @@ StatementsParser::ParseResult StatementsParser::ParseElIf(LexScanner& lexer, Sta
262263

263264
auto renderer = std::make_shared<ElseBranchStatement>(*valueExpr);
264265
StatementInfo statementInfo = StatementInfo::Create(StatementInfo::ElseIfStatement, stmtTok);
265-
statementInfo.renderer = renderer;
266+
statementInfo.renderer = std::static_pointer_cast<IRendererBase>(renderer);
266267
statementsInfo.push_back(statementInfo);
267268
return ParseResult();
268269
}

src/value_visitors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace detail
2525
template<typename V>
2626
struct RecursiveUnwrapper
2727
{
28-
V* m_visitor;
28+
V* m_visitor{};
2929

3030
RecursiveUnwrapper(V* v)
3131
: m_visitor(v)

thirdparty/fmtlib

Submodule fmtlib updated 65 files

thirdparty/gtest

Submodule gtest updated 234 files

thirdparty/thirdparty-internal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include(FetchContent)
1818
FetchContent_Declare(
1919
Boost
2020
GIT_REPOSITORY https://github.com/boostorg/boost.git
21-
GIT_TAG boost-1.80.0
21+
GIT_TAG boost-1.82.0
2222
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../cmake/patches/0001-fix-skip-install-rules.patch" || true
2323
)
2424
FetchContent_MakeAvailable(Boost)

0 commit comments

Comments
 (0)