Hi,
This isn't really a deal.II issue but as there are C++ gurus on here, I
thought you could help resolve this.
I just compiled deal.II with the Intel C++ XE compiler. In my code, I've had
to replace all occurrences of std::tr1 with the boost counterpart. However,
for some reason, the compiler has issues with std::pair.
The line of code is:
myMap.insert( std::pair<Tuple, Tuple>( boost::make_tuple(x, y, z),
boost::make_tuple(A, B, C) ) );
Tuple is a typedef:
typedef boost::tuple<double, double, double> Tuple;
myMap is a std:map:
std::map<Tuple, Tuple> Map;
These all worked fine with gcc.
The error I get is:
main.cc(776): error: argument list for class template "std::pair" is missing
myMap.insert( std::pair( boost::make_tuple(x, y, z), boost::make_tuple(A,
B, C) ) );
^
detected during instantiation of "void Foo<dim>::run() [with
dim=3]" at line 1163
/usr/include/c++/4.4.3/bits/stl_function.h(230): error: no operator "<"
matches these operands
operand types are: const Tuple < const Tuple
{ return __x < __y; }
^
detected during:
instantiation of "bool std::less<_Tp>::operator()(const _Tp &,
const _Tp &) const [with _Tp=Tuple]" at line 1170 of
"/usr/include/c++/4.4.3/bits/stl_tree.h"
instantiation of "std::pair<std::_Rb_tree_iterator<_Val>, bool>
std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_M_insert_unique(const _Val &) [with _Key=Tuple,
_Val=std::pair<const Tuple, Tuple>,
_KeyOfValue=std::_Select1st<std::pair<const Tuple, Tuple>>,
_Compare=std::less<Tuple>, _Alloc=std::allocator<std::pair<const Tuple,
Tuple>>]" at line 500 of "/usr/include/c++/4.4.3/bits/stl_map.h"
instantiation of "std::pair<std::_Rb_tree<_Key, std::pair<const
_Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp>>, _Compare,
_Alloc::rebind<std::pair<const _Key, _Tp>>::other>::iterator, bool>
std::map<_Key, _Tp, _Compare, _Alloc>::insert(const std::pair<const _Key,
_Tp> &) [with _Key=Tuple, _Tp=Tuple, _Compare=std::less<Tuple>,
_Alloc=std::allocator<std::pair<const Tuple, Tuple>>]" at line 776 of
"main.cc"
instantiation of "void Foo<dim>::setup_system() [with dim=3]" at
line 1069 of "main.cc"
instantiation of "void Foo<dim>::run() [with dim=3]" at line
1163 of "main.cc"
compilation aborted for main.cc (code 2)
--
Many thanks,
Theodore
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii