I really think I will eventually convert the codebase to C99:

# COMPILE human-tests/browse.o
/data/compiler/intel-compiler-11.1/bin/intel64/icc  -fast  -I. -Isrc  -I/data/system/x86-64/Linux/intel/include -D_REENTRANT -DLINUX -DIN_SNDFILE -DIN_VORBISFILE -DIN_LIBMPG123 -DEFFECT_TIMEPITCH -DEFFECT_LADSPA -DOUT_OSS -DOUT_ALSA -I/usr/include/alsa   -c -o human-tests/browse.o human-tests/browse.cxx
/usr/include/c++/4.6.3/bits/stl_algobase.h(573): error: type name is not allowed
        const bool __simple = (__is_trivial(_ValueType1)
                                            ^
          detected during:
            instantiation of "_BI2 std::__copy_move_backward_a2<_IsMove,_BI1,_BI2>(_BI1, _BI1, _BI2) [with _IsMove=false, _BI1=std::string *, _BI2=std::string *]" at line 625
            instantiation of "_BI2 std::copy_backward(_BI1, _BI1, _BI2) [with _BI1=std::string *, _BI2=std::string *]" at line 315 of "/usr/include/c++/4.6.3/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 834 of "/usr/include/c++/4.6.3/bits/stl_vector.h"
            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

/usr/include/c++/4.6.3/bits/stl_algobase.h(573): error: identifier "__is_trivial" is undefined
        const bool __simple = (__is_trivial(_ValueType1)
                               ^
          detected during:
            instantiation of "_BI2 std::__copy_move_backward_a2<_IsMove,_BI1,_BI2>(_BI1, _BI1, _BI2) [with _IsMove=false, _BI1=std::string *, _BI2=std::string *]" at line 625
            instantiation of "_BI2 std::copy_backward(_BI1, _BI1, _BI2) [with _BI1=std::string *, _BI2=std::string *]" at line 315 of "/usr/include/c++/4.6.3/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 834 of "/usr/include/c++/4.6.3/bits/stl_vector.h"
            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

/usr/include/c++/4.6.3/bits/stl_uninitialized.h(117): error: identifier "__is_trivial" is undefined
        return std::__uninitialized_copy<(__is_trivial(_ValueType1)
                                          ^
          detected during:
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Tp=std::string]" at line 269
            instantiation of "_ForwardIterator std::__uninitialized_move_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Allocator=std::allocator<std::string>]" at line 346 of "/usr/include/c++/4.6.3/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 834 of "/usr/include/c++/4.6.3/bits/stl_vector.h"
            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

/usr/include/c++/4.6.3/bits/stl_uninitialized.h(117): error: function call is not allowed in a constant expression
        return std::__uninitialized_copy<(__is_trivial(_ValueType1)
                                          ^
/usr/include/c++/4.6.3/bits/stl_uninitialized.h(117): error: type name is not allowed
        return std::__uninitialized_copy<(__is_trivial(_ValueType1)
                                                       ^
          detected during:
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Tp=std::string]" at line 269
            instantiation of "_ForwardIterator std::__uninitialized_move_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Allocator=std::allocator<std::string>]" at line 346 of "/usr/include/c++/4.6.3/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 834 of "/usr/include/c++/4.6.3/bits/stl_vector.h"
            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

/usr/include/c++/4.6.3/bits/stl_uninitialized.h(118): error: function call is not allowed in a constant expression
  					&& __is_trivial(_ValueType2))>::
  					   ^
          detected during:
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Tp=std::string]" at line 269
            instantiation of "_ForwardIterator std::__uninitialized_move_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Allocator=std::allocator<std::string>]" at line 346 of "/usr/include/c++/4.6.3/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 834 of "/usr/include/c++/4.6.3/bits/stl_vector.h"
            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

/usr/include/c++/4.6.3/bits/stl_uninitialized.h(118): error: type name is not allowed
  					&& __is_trivial(_ValueType2))>::
  					                ^
          detected during:
            instantiation of "_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp> &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Tp=std::string]" at line 269
            instantiation of "_ForwardIterator std::__uninitialized_move_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator &) [with _InputIterator=std::string *, _ForwardIterator=std::string *, _Allocator=std::allocator<std::string>]" at line 346 of "/usr/include/c++/4.6.3/bits/vector.tcc"
            instantiation of "void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc>>, const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 834 of "/usr/include/c++/4.6.3/bits/stl_vector.h"
            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::string, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

compilation aborted for human-tests/browse.cxx (code 2)


The one interesting message is that:

            instantiation of "void std::vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp=std::stri
ng, _Alloc=std::allocator<std::string>]" at line 29 of "human-tests/browse.cxx"

... there is something wrong in human-tests/browse.c, at line 29. That line reads

		quest.push_back(string(argv[i]));

Wow, that's early failure. The context ist that:

int main(int argc, char** argv)
{
	if(argc > 1)
	{
		vector<string> quest;
		for(int i=1; i<argc; ++i)
		quest.push_back(string(argv[i]));
	}


How is that illegal code? I know, Intel C++ compiler version 11.1 is not the latest one, but it's rather advanced from the first introduction of C++ support. And such a simple program is still making the compiler throw a fit? I have to conclude that C++ is just too hard, not just for programmers, but also for compiler writers. This is not news, really.

Let's confirm this. Stand-alone program.


#include <string>
#include <vector>

int main(int argc, char** argv)
{
	if(argc > 1)
	{
		std::vector<std::string> quest;
		for(int i=1; i<argc; ++i)
		quest.push_back(std::string(argv[i]));
	}
	return 0;
}

Funny, icc 11.0 on another machine doesn't seem to have an issue here. They introduced that in 11.1? Version 13.0.1 on that box is also fine. As long as such crap can creep in to a major compiler that late in its life and puke pages of insane error gibberisch into my terminal, I don't consider C++ something that you seriously work with.

Ah, one reason might be that I might have updated gcc after installing the intel compiler. Hardly anything seems to build currenty with that compiler. Hardly anything C++, that is. The Sun/Oracle compiler also has some trouble ... build works, but it rather likes to crash on anything involving threads with descructors. This is a complicated mess.

Ah! It's failure to disable exceptions! My code relies on exceptions not being in place so much that it crashes on destructors if they are present. funny. It works with Intel compiler on that other box now (at least tests not crashing).
