boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
100 stars 116 forks source link

vector.hpp: argument list for class template missing #95

Closed marcfehling closed 5 years ago

marcfehling commented 5 years ago

I am currently trying to include several boost headers which themselves rely on boost/container/vector.hpp in our code project, but compilation with the Intel compiler Intel 19.0.0.117 20180804 leads to the following errors:

.../boost-1.69.0/include/boost/container/vector.hpp(3369): error: argument list for class template "boost::container::vector" is missing
  vector(InputIterator, InputIterator) ->
  ^

.../boost-1.69.0/include/boost/container/vector.hpp(3369): error: expected a ")"
  vector(InputIterator, InputIterator) ->
                      ^

.../boost-1.69.0/include/boost/container/vector.hpp(3369): error: expected a ";"
  vector(InputIterator, InputIterator) ->
                                       ^

boost 1.69.0 was built with:

bootstrap.sh --without-libraries= --with-toolset=intel-linux
b2 toolset=intel-linux install

I tried to reproduce this on older versions of both compiler and boost. Intel 18 and boost 1.66.0 seem to be compatible. Could you try to reproduce this?

See https://github.com/dealii/dealii/issues/7546 for further information.

marcfehling commented 5 years ago

This is the code in question: https://github.com/boostorg/container/blob/43c0257871e2f4a5d533c059f197a635a58361f2/include/boost/container/vector.hpp#L3369

marcfehling commented 5 years ago

At first glance, it seems that Intel 19 does not provide class template argument deduction (CTAD).

Compilation with Intel 18.0.2 20180210 and boost 1.69.0 works flawlessly.

marcfehling commented 5 years ago

The documentation for the compiler says that CTAD has not been included in any of Intel's compilers yet (look for entry P0091R3).

Thus we need a different statement to check whether CTAD is supported than the current one: https://github.com/boostorg/container/blob/43c0257871e2f4a5d533c059f197a635a58361f2/include/boost/container/detail/workaround.hpp#L123