For completeness, the full solution is in platformio.ini add to the [env:…] section:
build_unflags = -std=c++11
build_flags = -std=c++14
platform_packages =
toolchain-xtensa @ https://github.com/WallaceWilliam/xtensa-lx106-elf/raw/master/xtensa-lx106-elf-macos-1.22.0-100-ge567ec7-5.2.0.tar.gz
and on macOS you can build with c++14