From c96b6f51603e39bd71e0cfcd706aa582785c51c5 Mon Sep 17 00:00:00 2001 From: Igor Machado Date: Wed, 18 Oct 2023 15:43:30 +0000 Subject: [PATCH] feat: fixed for c++17 --- makefile | 2 +- optframe/optframe_lib.cpp | 11 +++++++++-- thirdparty/optframe-external | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index b99219f..10fe601 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,7 @@ CC_GCC=g++ CC_CLANG=clang++ #CC=clang++ #CPPSTD=-std=c++20 # -fconcepts-diagnostics-depth=2 # -Wfatal-errors -CPPSTD=--std=c++17 -Wfatal-errors # TODO REMOVE # -Wfatal-errors +CPPSTD=--std=c++17 # TODO REMOVE # -Wfatal-errors ########################################## # SUBMODULE LOCATION diff --git a/optframe/optframe_lib.cpp b/optframe/optframe_lib.cpp index 778484b..d801392 100644 --- a/optframe/optframe_lib.cpp +++ b/optframe/optframe_lib.cpp @@ -1854,7 +1854,11 @@ optframe_api1d_create_initial_search(FakeEnginePtr _engine, int ev_idx, int c_id // std::shared_ptr initial; engine->loader.factory.assign(initial, c_idx, "OptFrame:Constructive"); - assert(initial); + if(!initial) { + std::cout << "ERROR: failed to assign component '" << MyConstructive::idComponent() + << "' as 'OptFrame:Constructive'" << std::endl; + assert(initial); + } // sref> initSol{ new optframe::BasicInitialSearch(initial, single_ev) @@ -1879,8 +1883,11 @@ optframe_api0d_get_evaluator(FakeEnginePtr _engine, int idx_ev) std::shared_ptr> component; engine->loader.factory.assign(component, idx_ev, "OptFrame:GeneralEvaluator"); - if (!component) + if (!component) { + std::cout << "ERROR: failed to assign component '" << optframe::GeneralEvaluator::idComponent() + << "' as 'OptFrame:GeneralEvaluator'" << std::endl; assert(false); + } void* ptr = component.get(); return ptr; } diff --git a/thirdparty/optframe-external b/thirdparty/optframe-external index a9bc8b1..a2e0458 160000 --- a/thirdparty/optframe-external +++ b/thirdparty/optframe-external @@ -1 +1 @@ -Subproject commit a9bc8b1ed809c00dc3e643218d3e803ae3e128b0 +Subproject commit a2e04587f80927364de671b32e68b0f41c6a0e60