Skip to content

Commit

Permalink
c++23 build with stacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolse committed Dec 30, 2023
1 parent 44e5563 commit 882a4e3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ target_include_directories(beam INTERFACE
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/3rdparty)

target_compile_features(beam INTERFACE cxx_std_17)
target_compile_features(beam INTERFACE cxx_std_23)


file(WRITE ${PROJECT_SOURCE_DIR}/beam_version.gen "${PROJECT_VERSION}")
Expand All @@ -121,7 +121,7 @@ endif()

include(AddTest)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(BEAM_USE_AVX FALSE)
Expand Down
3 changes: 0 additions & 3 deletions bvm/ManagerStd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,9 @@ namespace bvm2 {
{
while (!IsDone())
{
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
if (IsSuspended())
return;
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
RunOnce();
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
}
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
OnDone(nullptr);
Expand Down
6 changes: 3 additions & 3 deletions mnemonic/mnemonic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ namespace beam

bool isAllowedWord(const string& word, const Dictionary& dict)
{
auto predicate = [] (const char* left, const char* right) {
auto sortPredicate = [] (const char* left, const char* right) {
return strcmp(left, right) < 0;
};
assert(is_sorted(dict.begin(), dict.end(), predicate));
return binary_search(dict.begin(), dict.end(), word.c_str(), predicate);
assert(is_sorted(dict.begin(), dict.end(), sortPredicate));
return binary_search(dict.begin(), dict.end(), word.c_str(), sortPredicate);
}

bool isValidMnemonic(const WordList& words, const Dictionary& dict)
Expand Down
3 changes: 3 additions & 0 deletions wallet/core/contracts/shaders_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <boost/scope_exit.hpp>
#include "shaders_manager.h"
#include "utility/logger.h"
#include <stacktrace>

namespace beam::wallet {

Expand Down Expand Up @@ -263,6 +264,7 @@ namespace beam::wallet {
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
if (_queue.empty())
{
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "] no requests";
return;
}
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
Expand Down Expand Up @@ -370,6 +372,7 @@ namespace beam::wallet {

void ShadersManager::OnDone(const std::exception *pExc)
{
LOG_INFO() << "Stacktrace: " << std::to_string(std::stacktrace::current());
LOG_INFO() << __FUNCTION__ << "[" << __LINE__ << "]";
if (pExc && pExc->what() && pExc->what()[0] != 0)
{
Expand Down

0 comments on commit 882a4e3

Please sign in to comment.