void func(S s, bool is_yellow! = false, bool is_round!);
func(S{}, is_round = true);
int a = 12;
auto f = [!]{b*b + a*c}
auto r = f(b = 2, c = 7);
--- /home/axel/build/llvm/src/clang/lib/Basic/SourceManager.cpp 2022-06-16 17:30:55.116188230 +0200 | |
+++ /home/axel/build/root/llvmupgrade/src/interpreter/llvm/src/tools/clang/lib/Basic/SourceManager.cpp 2022-06-09 15:57:42.889506634 +0200 | |
@@ -101,7 +101,7 @@ | |
} | |
llvm::Optional<llvm::MemoryBufferRef> | |
-ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, | |
+ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, const SourceManager &SM, | |
SourceLocation Loc) const { | |
// Lazily create the Buffer for ContentCaches that wrap files. If we already |
13:13 $ vg root.exe tutorials/hsimple.C | |
==22318== Memcheck, a memory error detector | |
==22318== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. | |
==22318== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info | |
==22318== Command: root.exe tutorials/hsimple.C | |
==22318== | |
------------------------------------------------------------------ | |
| Welcome to ROOT 6.21/01 https://root.cern | | |
| (c) 1995-2019, The ROOT Team; conception: R. Brun, F. Rademakers | | |
| Built for linuxx8664gcc on Feb 24 2020, 14:17:37 | |
using namespace ROOT::Experimental; | |
TCanvas canv; | |
// short for canv.GetFrame()->SetLogY(): | |
canv.SetLogY(); | |
// TPad background colors etc?! | |
THist1DDrawingOpts::Default().Box().LineWidth(3); | |
THist2DDrawingOpts::Default().SetLineWidth(7); |
// This is the change: | |
tree->Draw("x"); | |
// `hist` used to be a pointer to a `TH1F`, now is pointing to `TH1D` | |
auto hist = (TH1*)gDirectory->FindObject("htemp"); | |
// QUESTION: Is that worse than people getting wrong results because of float precision? | |
// The change is not problematic when using it as `TH1`. | |
hist->Draw(); |
// Want to be able to call functions with naming parameters. | |
// Advantages: | |
// 1) readability: better than func(true, truie, false); | |
// 2) interface stability: can add parameters even in the middle | |
// 3) can skip default parameters in calls | |
// 4) enforces agreement on parameters' semantic meaning for all redecls | |
// 5) ...I'm missing something, what was it? | |
// Named parameters are introduced by a `!` preceding the parameter name | |
// (other options: `!` following the param name, but ambiguous with `!=`) |
int capt = 42; | |
// Long lambda: | |
auto l0 = [&capt](auto&& x, auto&& y){ return x * y - capt; }; | |
// Ideally want | |
auto l1 = [&capt]{ x * y - capt }; // NOT proposing this | |
// but that cannot be invoked by `l(12, 13);` - what is x, what is y? | |
// Instead this can work, with a new std::arg_v: |
void func(S s, bool is_yellow! = false, bool is_round!);
func(S{}, is_round = true);
int a = 12;
auto f = [!]{b*b + a*c}
auto r = f(b = 2, c = 7);
void func (const vector<long double>& param); | |
std::stringstream& thisReturnsAStringStream(int i); |
auto df = GetDataFrameChecked(); | |
const auto dBSize = defaultBranches.size(); | |
const BranchNames_t &defaultBranches = df->GetDefaultBranches(); | |
auto df = GetDataFrameChecked(); | |
const BranchNames_t &defaultBranches = df->GetDefaultBranches(); | |
const auto dBSize = defaultBranches.size(); |
var allGood = myTree | |
.Select(t => particles.Where(p => p.fVector.Pt > minPt)) | |
.Where(ps => ps.Count() >= N) | |
.SelectMany(ps => ps); |