Kaleidoscope Tutorial Chapter 4 compile fails Debian GNU/Linux 11 (bullseye)

Trying to compile chapter 4 toy.cpp ( was able to compile previous chapters ):

clang++ -g toy.cpp llvm-config --cxxflags --ldflags --system-libs --libs core orcjit native -rdynamic -O3 -o toyp
318In file included from toy.cpp:2:
319In file included from ././KaleidoscopeJIT.h:17:
320In file included from ././llvm/ADT/StringRef.h:14:
321In file included from ././llvm/ADT/./STLFunctionalExtras.h:18:
322././llvm/ADT/./STLForwardCompat.h:46:35: error: no template named ‘optional’ in namespace ‘std’
323auto transformOptional(const std::optional &O, const Function &F)
324 ~~~~~^