No template named 'allocator'; did you mean ::std::allocator


I tried to include a file that includes the chaiscript code in another part of my system but when I went to compile I got numerous errors like the one in the subject line, others include 'no template named ‘enable_if’, no template named ‘is_random_access_iterator’ and so forth.

They’re all traced back to the standard deque header and presumably this is a namespace issue. However, it’s unclear to me how to fix this. I’ve tried adding using namespace std in a couple of likely (to me) places but to no avail.

Any ideas on how to fix this?


This sounds very much like an issue that others have reported on the android system because it has broken/incomplete C++11 headers.

My hunch would be that in the particular file being compiled something is off with your C++11 options or standard library. Does that sound plausible? Can you confirm which compiler and command line options are being passed in?


OS X 10.5, Xcode 7.2 with LLVM 7 configured to use C++11

Project generated by a tool called introducer (

Hard to believe that headers would be missing.


I’m going to strongly suggest that you look at the actual command line being executed. There’s probably something going on there. I’m extremely careful inside of ChaiScript to not muck with the compilation or introduce #defines that could screw things up.


The compilation command line contains 3,193 characters. Without knowing what I’m looking for, that’s a chore not worth doing :slight_smile: The issue is most likely a dependency. I moved the #include of a file that #included the chaiscript stuff to a different place and the problem went away.



I kind of expected you to paste the command line here, for us to look at it together. What is the dependency that moving around changed things?


/Applications/ -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -D_DEBUG=1 -DDEBUG=1 -DScriptingSystem -DJUCER_XCODE_MAC_F6D2F4CF=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -isysroot /Applications/ -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.9 -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -iquote /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -iquote /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -I/Volumes/HD2/src/Deskew/Projects/TheGigRack/Builds/MacOSX/build/Debug/include -I…/…/…/…/Libraries/VST3\ SDK -I…/…/JuceLibraryCode -I…/…/JUCE/modules -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -Wreorder -F/Volumes/HD2/src/Deskew/Projects/TheGigRack/Builds/MacOSX/build/Debug -MMD -MT dependencies -MF /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ --serialize-diagnostics /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/ -c /Volumes/HD2/src/Deskew/Projects/TheGigRack/Source/Processors/IOAudioProcessor.cpp -o /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/


Sorry — figured it was too big. I don’t know what the dependency is — if I did, I could figure out the issue. I assumed that there was some unsatisfied dependency precisely because successful compilation was based on from where I included (indirectly) the chaiscript header.


Out of curiosity, do you know what others did to fix the problem on android?