* installing *source* package ‘emcAdr’ ... ** this is package ‘emcAdr’ version ‘1.2’ ** package ‘emcAdr’ successfully unpacked and MD5 sums checked ** using staged installation ** libs using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.6.3.2)’ using SDK: ‘MacOSX26.2.sdk’ clang++ -mmacos-version-min=26 -std=gnu++20 -I"/Users/ripley/R/R-devel/include" -DNDEBUG -I'/Users/ripley/R/Library/Rcpp/include' -I'/Users/ripley/R/Library/RcppArmadillo/include' -isystem /opt/R/arm64/include -fPIC -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -c DataManager.cpp -o DataManager.o In file included from DataManager.cpp:1: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:192: /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/wrap.h:71:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 71 | return Rf_mkCharLen(st.data(), st.size()); | ~~~~~~~~~~~~ ~~~^~~~~~ In file included from DataManager.cpp:1: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:40: /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloSugar.h:45:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'typename storage_type<13>::type' (aka 'int') [-Wshorten-64-to-32] 45 | j[ie] = cp; | ~ ^~ DataManager.cpp:47:22: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 47 | posOcc = codeI.find(delimiter); | ~ ~~~~~~^~~~~~~~~~~~~~~ DataManager.cpp:130:19: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 130 | index= score*10; | ~ ~~~~~^~~ DataManager.cpp:133:33: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 133 | index = returnedVec.size()-1; | ~ ~~~~~~~~~~~~~~~~~~^~ DataManager.cpp:283:17: warning: implicit conversion loses integer precision: '__iter_diff_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 283 | int ADRCount = std::count(observationsADR.begin(), observationsADR.end(), true); | ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DataManager.cpp:284:46: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 284 | int patient_number = observationsMedication.size(); | ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ DataManager.cpp:366:26: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 366 | int line_size = line.size(); | ~~~~~~~~~ ~~~~~^~~~~~ DataManager.cpp:532:34: warning: implicit conversion loses integer precision: 'typename iterator_traits<__wrap_iter>::difference_type' (aka 'long') to 'value_type' (aka 'int') [-Wshorten-64-to-32] 532 | rowth_cocktail.push_back(std::distance(ATC_name.begin(), it)); | ~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DataManager.cpp:572:34: warning: implicit conversion loses integer precision: 'typename iterator_traits<__wrap_iter>::difference_type' (aka 'long') to 'value_type' (aka 'int') [-Wshorten-64-to-32] 572 | rowth_cocktail.push_back(std::distance(ATC_name.begin(), it)); | ~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10 warnings generated. clang++ -mmacos-version-min=26 -std=gnu++20 -I"/Users/ripley/R/R-devel/include" -DNDEBUG -I'/Users/ripley/R/Library/Rcpp/include' -I'/Users/ripley/R/Library/RcppArmadillo/include' -isystem /opt/R/arm64/include -fPIC -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -c Individual.cpp -o Individual.o In file included from Individual.cpp:1: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:192: /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/wrap.h:71:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 71 | return Rf_mkCharLen(st.data(), st.size()); | ~~~~~~~~~~~~ ~~~^~~~~~ In file included from Individual.cpp:1: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:40: /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloSugar.h:45:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'typename storage_type<13>::type' (aka 'int') [-Wshorten-64-to-32] 45 | j[ie] = cp; | ~ ^~ Individual.cpp:80:27: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 80 | int returnedSumInDelt = sumInDelt; | ~~~~~~~~~~~~~~~~~ ^~~~~~~~~ 3 warnings generated. clang++ -mmacos-version-min=26 -std=gnu++20 -I"/Users/ripley/R/R-devel/include" -DNDEBUG -I'/Users/ripley/R/Library/Rcpp/include' -I'/Users/ripley/R/Library/RcppArmadillo/include' -isystem /opt/R/arm64/include -fPIC -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -c MCMC.cpp -o MCMC.o In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:192: /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/wrap.h:71:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 71 | return Rf_mkCharLen(st.data(), st.size()); | ~~~~~~~~~~~~ ~~~^~~~~~ In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:40: /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloSugar.h:45:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'typename storage_type<13>::type' (aka 'int') [-Wshorten-64-to-32] 45 | j[ie] = cp; | ~ ^~ MCMC.cpp:126:17: warning: implicit conversion turns floating-point number into integer: 'typename storage_type<14>::type' (aka 'double') to 'int' [-Wfloat-conversion] 126 | nbMedic = 1 + Rcpp::rpois(1,meanMedic)[0]; | ~ ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:131:13: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 131 | num = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:148:17: warning: implicit conversion turns floating-point number into integer: 'typename storage_type<14>::type' (aka 'double') to 'int' [-Wfloat-conversion] 148 | nbMedic = 1 + Rcpp::rpois(1,meanMedic)[0]; | ~ ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:153:13: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 153 | num = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:182:17: warning: implicit conversion turns floating-point number into integer: 'typename storage_type<14>::type' (aka 'double') to 'int' [-Wfloat-conversion] 182 | nbMedic = 1 + Rcpp::rpois(1,meanMedic)[0]; | ~ ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:187:13: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 187 | num = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:212:15: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 212 | num = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:250:19: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 250 | int mutateMed = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:262:21: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 262 | mutateMed = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:269:25: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 269 | int removeIndex = trunc(Rcpp::runif(1,0,indiv.getMedications().size())[0]); | ~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:283:19: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 283 | int mutateMed = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:299:21: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 299 | mutateMed = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:307:25: warning: implicit conversion turns floating-point number into integer: 'typename storage_type<14>::type' (aka 'double') to 'int' [-Wfloat-conversion] 307 | int chosenMedic = Rcpp::sample(Rcpp::as(Rcpp::wrap(newMed)),1)[0]; | ~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MCMC.cpp:312:26: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 312 | replacementMed = trunc(Rcpp::runif(1,0,treeSize)[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:35: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp.h:79: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/sugar.h:31: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/functions.h:89: /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:439:15: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 439 | int n = x.size(); | ~ ~~^~~~~~ MCMC.cpp:307:31: note: in instantiation of function template specialization 'Rcpp::sample<14>' requested here 307 | int chosenMedic = Rcpp::sample(Rcpp::as(Rcpp::wrap(newMed)),1)[0]; | ^ In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:35: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp.h:79: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/sugar.h:31: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/functions.h:89: /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:203:17: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 203 | int n = ref.size(); | ~ ~~~~^~~~~~ /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:455:38: note: in instantiation of function template specialization 'Rcpp::sugar::WalkerSample<14>' requested here 455 | return nc > 200 ? sugar::WalkerSample(p, size, x) : | ^ MCMC.cpp:307:31: note: in instantiation of function template specialization 'Rcpp::sample<14>' requested here 307 | int chosenMedic = Rcpp::sample(Rcpp::as(Rcpp::wrap(newMed)),1)[0]; | ^ In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:35: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp.h:79: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/sugar.h:31: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/functions.h:89: /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:116:17: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 116 | int n = ref.size(); | ~ ~~~~^~~~~~ /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:456:38: note: in instantiation of function template specialization 'Rcpp::sugar::SampleReplace<14>' requested here 456 | sugar::SampleReplace(p, size, x); | ^ MCMC.cpp:307:31: note: in instantiation of function template specialization 'Rcpp::sample<14>' requested here 307 | int chosenMedic = Rcpp::sample(Rcpp::as(Rcpp::wrap(newMed)),1)[0]; | ^ In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:35: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp.h:79: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/sugar.h:31: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/functions.h:89: /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:297:17: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 297 | int n = ref.size(); | ~ ~~~~^~~~~~ /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:463:23: note: in instantiation of function template specialization 'Rcpp::sugar::SampleNoReplace<14>' requested here 463 | return sugar::SampleNoReplace(p, size, x); | ^ MCMC.cpp:307:31: note: in instantiation of function template specialization 'Rcpp::sample<14>' requested here 307 | int chosenMedic = Rcpp::sample(Rcpp::as(Rcpp::wrap(newMed)),1)[0]; | ^ In file included from MCMC.cpp:1: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:35: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp.h:79: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/sugar.h:31: In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/functions.h:89: /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:369:17: warning: implicit conversion loses integer precision: 'R_xlen_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 369 | int n = ref.size(); | ~ ~~~~^~~~~~ /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/sample.h:470:19: note: in instantiation of function template specialization 'Rcpp::sugar::EmpiricalSample<14>' requested here 470 | return sugar::EmpiricalSample(size, replace, x); | ^ MCMC.cpp:307:31: note: in instantiation of function template specialization 'Rcpp::sample<14>' requested here 307 | int chosenMedic = Rcpp::sample(Rcpp::as(Rcpp::wrap(newMed)),1)[0]; | ^ 21 warnings generated. clang++ -mmacos-version-min=26 -std=gnu++20 -I"/Users/ripley/R/R-devel/include" -DNDEBUG -I'/Users/ripley/R/Library/Rcpp/include' -I'/Users/ripley/R/Library/RcppArmadillo/include' -isystem /opt/R/arm64/include -fPIC -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -c Population.cpp -o Population.o In file included from Population.cpp:1: In file included from ./Population.h:4: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:192: /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/wrap.h:71:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 71 | return Rf_mkCharLen(st.data(), st.size()); | ~~~~~~~~~~~~ ~~~^~~~~~ In file included from Population.cpp:1: In file included from ./Population.h:4: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:40: /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloSugar.h:45:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'typename storage_type<13>::type' (aka 'int') [-Wshorten-64-to-32] 45 | j[ie] = cp; | ~ ^~ Population.cpp:28:74: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 28 | ind = newIndividualWithCocktailSize(treeSize, ind.getMedications().size(), 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~ Population.cpp:92:24: warning: implicit conversion turns floating-point number into integer: 'typename storage_type<14>::type' (aka 'double') to 'int' [-Wfloat-conversion] 92 | indexDrawing = Rcpp::runif(1, 0, popSize)[0]; | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Population.cpp:99:31: warning: implicit conversion turns floating-point number into integer: 'double' to 'size_type' (aka 'unsigned long') [-Wfloat-conversion] 99 | indexMax = individuals_[indexMax] > individuals_[selectedIndividuals[j]] ? indexMax : selectedIndividuals[j]; | ~~~~~~~~~~~~ ^~~~~~~~ Population.cpp:101:57: warning: implicit conversion turns floating-point number into integer: 'double' to 'size_type' (aka 'unsigned long') [-Wfloat-conversion] 101 | matingPool.addAnIndividualToPopulation(individuals_[indexMax]); | ~~~~~~~~~~~~ ^~~~~~~~ Population.cpp:81:30: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 81 | int popSize = individuals_.size(); | ~~~~~~~ ~~~~~~~~~~~~~^~~~~~ Population.cpp:120:26: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 120 | selectedNode = trunc(Rcpp::runif(1,0,ATCtree.nrow())[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Population.cpp:144:26: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 144 | selectedNode = trunc(Rcpp::runif(1,0,ATCtree.nrow())[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Population.cpp:107:50: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 107 | int remainingIndividuals = individuals_.size() - nbElite; | ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ Population.cpp:189:80: warning: implicit conversion turns floating-point number into integer: 'double' to 'size_type' (aka 'unsigned long') [-Wfloat-conversion] 189 | tmp = type2Mutation(individuals_[i].second, ATCtree.nrow(), vertex[chosenVertexIdx]); | ~~~~~~ ^~~~~~~~~~~~~~~ Population.cpp:249:41: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 249 | int max_idx_j = j == idx.size()-1 ? M.size() : idx[j+1]; | ~~~~~~~~~ ~~^~~~~~ Population.cpp:263:39: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 263 | int initial_length = indexC1.size() + indexC2.size(); | ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ Population.cpp:304:41: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 304 | int max_idx_j = j == idx.size()-1 ? M.size() : idx[j+1]; | ~~~~~~~~~ ~~^~~~~~ In file included from Population.cpp:1: In file included from ./Population.h:4: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:67: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/numeric:164: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__numeric/accumulate.h:42:14: error: no matching function for call to object of type '(lambda at Population.cpp:423:31)' 42 | __init = __binary_op(std::move(__init), *__first); | ^~~~~~~~~~~ Population.cpp:422:15: note: in instantiation of function template specialization 'std::accumulate *>, double, (lambda at Population.cpp:423:31)>' requested here 422 | return std::accumulate(individuals_.begin(), individuals_.end(), | ^ Population.cpp:423:31: note: candidate function not viable: expects an lvalue for 1st argument 423 | 0.0, [](double& a, const std::pair& b){ | ^ ~~~~~~~~~ Population.cpp:423:31: note: conversion candidate of type 'double (*)(double &, const std::pair &)' 14 warnings and 1 error generated. make[1]: *** [Population.o] Error 1 clang++ -mmacos-version-min=26 -std=gnu++20 -I"/Users/ripley/R/R-devel/include" -DNDEBUG -I'/Users/ripley/R/Library/Rcpp/include' -I'/Users/ripley/R/Library/RcppArmadillo/include' -isystem /opt/R/arm64/include -fPIC -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -c RcppExports.cpp -o RcppExports.o In file included from RcppExports.cpp:4: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:192: /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/wrap.h:71:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 71 | return Rf_mkCharLen(st.data(), st.size()); | ~~~~~~~~~~~~ ~~~^~~~~~ In file included from RcppExports.cpp:4: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:40: /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloSugar.h:45:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'typename storage_type<13>::type' (aka 'int') [-Wshorten-64-to-32] 45 | j[ie] = cp; | ~ ^~ 2 warnings generated. clang++ -mmacos-version-min=26 -std=gnu++20 -I"/Users/ripley/R/R-devel/include" -DNDEBUG -I'/Users/ripley/R/Library/Rcpp/include' -I'/Users/ripley/R/Library/RcppArmadillo/include' -isystem /opt/R/arm64/include -fPIC -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -c main.cpp -o main.o In file included from main.cpp:2: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:32: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:26: In file included from /Users/ripley/R/Library/Rcpp/include/RcppCommon.h:192: /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/wrap.h:71:47: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 71 | return Rf_mkCharLen(st.data(), st.size()); | ~~~~~~~~~~~~ ~~~^~~~~~ In file included from main.cpp:2: In file included from ./MCMC.h:5: In file included from ./Individual.h:10: In file included from /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo.h:40: /Users/ripley/R/Library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloSugar.h:45:17: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'typename storage_type<13>::type' (aka 'int') [-Wshorten-64-to-32] 45 | j[ie] = cp; | ~ ^~ main.cpp:211:27: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 211 | chosenVertexidx = trunc(Rcpp::runif(1,0,vertexX.size())[0]); | ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:248:22: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 248 | int index = 10 * currentGeom.first; | ~~~~~ ~~~^~~~~~~~~~~~~~~~~~~ main.cpp:112:51: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 112 | int notADRCount = observationsMedication.size() - ADRCount; | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.cpp:212:77: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 212 | chosenVertexidx = chosenVertexidx == vertexX.size() ? vertexX.size()-1 : chosenVertexidx; | ~ ~~~~~~~~~~~~~~^~ main.cpp:405:51: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 405 | int notADRCount = observationsMedication.size() - ADRCount; | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.cpp:590:23: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 590 | int index = 10 * computePhyperOutput.first; | ~~~~~ ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:550:17: warning: implicit conversion loses integer precision: '__iter_diff_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 550 | int ADRCount = std::count(observationsADR.begin(), observationsADR.end(), true); | ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:556:50: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 556 | int notADRCount = observationsMedication.size() - ADRCount; | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.cpp:743:26: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 743 | int index = 10 * computePhyperOutput.first; | ~~~~~ ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:700:18: warning: implicit conversion loses integer precision: '__iter_diff_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 700 | int ADRCount = std::count(observationsADR.begin(), observationsADR.end(), true); | ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:706:51: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 706 | int notADRCount = observationsMedication.size() - ADRCount; | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.cpp:949:72: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 947 | double phyper = ind.computePHypergeom(observationsMedication, observationsADR, | ~~~~~~~~~~~~~~~~~ 948 | upperBounds, ADRCount, 949 | observationsMedication.size() - ADRCount, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.cpp:996:18: warning: implicit conversion loses integer precision: '__iter_diff_t' (aka 'long') to 'int' [-Wshorten-64-to-32] 996 | int ADRCount = std::count(observationsADR.begin(), observationsADR.end(), true); | ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:1159:19: warning: implicit conversion turns floating-point number into integer: 'double' to 'value_type' (aka 'int') [-Wfloat-conversion] 1159 | vec.push_back(number); | ~~~~~~~~~ ^~~~~~ main.cpp:1366:54: warning: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Wfloat-conversion] 1366 | int approximated_cocktail_size = cocktail.size() / 3.8; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~^~~~~ main.cpp:1361:29: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 1361 | int beg_cocktail = line.find('|'); | ~~~~~~~~~~~~ ~~~~~^~~~~~~~~ main.cpp:1362:52: warning: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 1362 | int end_cocktail = line.substr(beg_cocktail+1).find('|'); | ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 19 warnings generated. make[1]: Target `all' not remade because of errors. ERROR: compilation failed for package ‘emcAdr’ * removing ‘/Users/ripley/R/packages/tests-devel/emcAdr.Rcheck/emcAdr’