Hi, i can compile the test program on my amd64 Debian 8.
Google and https://stackoverflow.com/questions/5834778/how-to-tell-where-a-header-file-is-included-from caused me to run $ g++ -H test.cpp to see all included files. Maybe it helps you to find what's missing on your system or where your local include empire derails: . /usr/include/c++/4.9/iostream .. /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++config.h ... /usr/include/x86_64-linux-gnu/c++/4.9/bits/os_defines.h .... /usr/include/features.h ..... /usr/include/x86_64-linux-gnu/sys/cdefs.h ...... /usr/include/x86_64-linux-gnu/bits/wordsize.h ..... /usr/include/x86_64-linux-gnu/gnu/stubs.h ...... /usr/include/x86_64-linux-gnu/gnu/stubs-64.h ... /usr/include/x86_64-linux-gnu/c++/4.9/bits/cpu_defines.h .. /usr/include/c++/4.9/ostream ... /usr/include/c++/4.9/ios .... /usr/include/c++/4.9/iosfwd ..... /usr/include/c++/4.9/bits/stringfwd.h ...... /usr/include/c++/4.9/bits/memoryfwd.h ..... /usr/include/c++/4.9/bits/postypes.h ...... /usr/include/c++/4.9/cwchar ....... /usr/include/wchar.h ........ /usr/include/stdio.h ........ /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h ........ /usr/include/x86_64-linux-gnu/bits/wchar.h ........ /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h ........ /usr/include/xlocale.h .... /usr/include/c++/4.9/exception ..... /usr/include/c++/4.9/bits/atomic_lockfree_defines.h .... /usr/include/c++/4.9/bits/char_traits.h ..... /usr/include/c++/4.9/bits/stl_algobase.h ...... /usr/include/c++/4.9/bits/functexcept.h ....... /usr/include/c++/4.9/bits/exception_defines.h ...... /usr/include/c++/4.9/bits/cpp_type_traits.h ...... /usr/include/c++/4.9/ext/type_traits.h ...... /usr/include/c++/4.9/ext/numeric_traits.h ...... /usr/include/c++/4.9/bits/stl_pair.h ....... /usr/include/c++/4.9/bits/move.h ........ /usr/include/c++/4.9/bits/concept_check.h ...... /usr/include/c++/4.9/bits/stl_iterator_base_types.h ...... /usr/include/c++/4.9/bits/stl_iterator_base_funcs.h ....... /usr/include/c++/4.9/debug/debug.h ...... /usr/include/c++/4.9/bits/stl_iterator.h ....... /usr/include/c++/4.9/bits/ptr_traits.h ...... /usr/include/c++/4.9/bits/predefined_ops.h ..... /usr/include/c++/4.9/cwchar ...... /usr/include/wchar.h .... /usr/include/c++/4.9/bits/localefwd.h ..... /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++locale.h ...... /usr/include/c++/4.9/clocale ....... /usr/include/locale.h ........ /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h ........ /usr/include/x86_64-linux-gnu/bits/locale.h ..... /usr/include/c++/4.9/cctype ...... /usr/include/ctype.h ....... /usr/include/x86_64-linux-gnu/bits/types.h ........ /usr/include/x86_64-linux-gnu/bits/wordsize.h ........ /usr/include/x86_64-linux-gnu/bits/typesizes.h ....... /usr/include/endian.h ........ /usr/include/x86_64-linux-gnu/bits/endian.h ........ /usr/include/x86_64-linux-gnu/bits/byteswap.h ......... /usr/include/x86_64-linux-gnu/bits/wordsize.h ......... /usr/include/x86_64-linux-gnu/bits/byteswap-16.h .... /usr/include/c++/4.9/bits/ios_base.h ..... /usr/include/c++/4.9/ext/atomicity.h ...... /usr/include/x86_64-linux-gnu/c++/4.9/bits/gthr.h ....... /usr/include/x86_64-linux-gnu/c++/4.9/bits/gthr-default.h ........ /usr/include/pthread.h ......... /usr/include/sched.h .......... /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h .......... /usr/include/time.h .......... /usr/include/x86_64-linux-gnu/bits/sched.h ......... /usr/include/time.h .......... /usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h .......... /usr/include/x86_64-linux-gnu/bits/time.h ........... /usr/include/x86_64-linux-gnu/bits/timex.h ......... /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h .......... /usr/include/x86_64-linux-gnu/bits/wordsize.h ......... /usr/include/x86_64-linux-gnu/bits/setjmp.h .......... /usr/include/x86_64-linux-gnu/bits/wordsize.h ......... /usr/include/x86_64-linux-gnu/bits/wordsize.h ...... /usr/include/x86_64-linux-gnu/c++/4.9/bits/atomic_word.h ..... /usr/include/c++/4.9/bits/locale_classes.h ...... /usr/include/c++/4.9/string ....... /usr/include/c++/4.9/bits/allocator.h ........ /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++allocator.h ......... /usr/include/c++/4.9/ext/new_allocator.h .......... /usr/include/c++/4.9/new ....... /usr/include/c++/4.9/bits/ostream_insert.h ........ /usr/include/c++/4.9/bits/cxxabi_forced.h ....... /usr/include/c++/4.9/bits/stl_function.h ........ /usr/include/c++/4.9/backward/binders.h ....... /usr/include/c++/4.9/bits/range_access.h ....... /usr/include/c++/4.9/bits/basic_string.h ....... /usr/include/c++/4.9/bits/basic_string.tcc ...... /usr/include/c++/4.9/bits/locale_classes.tcc .... /usr/include/c++/4.9/streambuf ..... /usr/include/c++/4.9/bits/streambuf.tcc .... /usr/include/c++/4.9/bits/basic_ios.h ..... /usr/include/c++/4.9/bits/locale_facets.h ...... /usr/include/c++/4.9/cwctype ....... /usr/include/wctype.h ........ /usr/include/wchar.h ...... /usr/include/c++/4.9/cctype ...... /usr/include/x86_64-linux-gnu/c++/4.9/bits/ctype_base.h ...... /usr/include/c++/4.9/bits/streambuf_iterator.h ...... /usr/include/x86_64-linux-gnu/c++/4.9/bits/ctype_inline.h ...... /usr/include/c++/4.9/bits/locale_facets.tcc ..... /usr/include/c++/4.9/bits/basic_ios.tcc ... /usr/include/c++/4.9/bits/ostream.tcc .. /usr/include/c++/4.9/istream ... /usr/include/c++/4.9/bits/istream.tcc Multiple include guards may be useful for: /usr/include/c++/4.9/clocale /usr/include/c++/4.9/cwctype /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/x86_64-linux-gnu/bits/byteswap.h /usr/include/x86_64-linux-gnu/bits/endian.h /usr/include/x86_64-linux-gnu/bits/locale.h /usr/include/x86_64-linux-gnu/bits/sched.h /usr/include/x86_64-linux-gnu/bits/time.h /usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/x86_64-linux-gnu/c++/4.9/bits/ctype_base.h /usr/include/x86_64-linux-gnu/c++/4.9/bits/ctype_inline.h /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/x86_64-linux-gnu/gnu/stubs.h Have a nice day :) Thomas