Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7953 Discussions

Intel icpc 18.0.0 incompatible with Xcode 9.0

John_G_8
Beginner
385 Views

This morning I got an automatic update to Xcode 9.0 and the Intel C++ compiler no longer works with the option -std=c++11.  For the simple routine

#include<stdlib.h>
#include<iostream>
#include<map>

int main(int argc,char **argv)
{
    double x[10], y[10];

    x[0] = 1.0;
    x[1] = 0.0;
    x[2] = 2.0;
    x[3] = -7.0;
    x[4] = 8.0;
    x[5] = 100.0;
    x[6] = -17.0;
    x[7] = -15.0;
    x[8] = 5.0;
    x[9] = 1.0;

    for (int i = 0; i < 10; ++i)
    y = x;

    std::map<double,double> M;

    for (int i = 0; i < 10; ++i)
    {
    if (M.find(x) == M.end())
        M[x] = y;
    else
        std::cerr << "Duplicate x found\n";
    }

    std::map<double,double>::iterator q;
    for (q = M.begin(); q != M.end(); ++q)
    std::cout << "q->first = " << q->first << ", q->second = " << q->second << "\n";
}

 

The compile line "icpc -c -std=c++11 Map.cc" yields the long error message

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple(406): error: template instantiation resulted in unexpected function type of "auto (std::__1::__tuple_types<const double &>, std::__1::__tuple_types<const double &>)->std::__1::__all<(bool)true>" (the meaning of a name may have changed since the template declaration -- the type of the template is "auto (std::__1::__tuple_types<_LArgs...>,
          std::__1::__tuple_types<_RArgs...>)->std::__1::__all<(std::__1::enable_if<_Trait<_LArgs, _RArgs>::value, bool>::type{true})...>")
    using __constructible = decltype(__do_test<is_constructible>(_ToArgs{}, _FromArgs{}));
                                                                                        ^
          detected during:
            instantiation of "std::__1::__tuple_sfinae_base::__do_test" based on template arguments <std::__1::is_constructible, const double &, const double &> at line 406
            instantiation of type "std::__1::__tuple_sfinae_base::__constructible<std::__1::__tuple_types<const double &>, std::__1::__tuple_types<const double &>>" at line 440
            instantiation of class "std::__1::__tuple_constructible<_Tp, _Up, true, true> [with _Tp=std::__1::tuple<const double &>, _Up=std::__1::__tuple_types<const double &>]" at line 513 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_explicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple(437): error: not a class or struct name
      : public __tuple_sfinae_base::__constructible<
               ^
          detected during:
            instantiation of class "std::__1::__tuple_constructible<_Tp, _Up, true, true> [with _Tp=std::__1::tuple<const double &>, _Up=std::__1::__tuple_types<const double &>]" at line 513 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_explicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(513): error: class "std::__1::__tuple_constructible<std::__1::tuple<const double &>, std::__1::__tuple_types<const double &>, true, true>" has no member "value"
                  >::value &&
                     ^
          detected during:
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_explicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple(408): error: template instantiation resulted in unexpected function type of "auto (std::__1::__tuple_types<const double &>, std::__1::__tuple_types<const double &>)->std::__1::__all<(bool)true>" (the meaning of a name may have changed since the template declaration -- the type of the template is "auto (std::__1::__tuple_types<_LArgs...>,
          std::__1::__tuple_types<_RArgs...>)->std::__1::__all<(std::__1::enable_if<_Trait<_LArgs, _RArgs>::value, bool>::type{true})...>")
    using __convertible = decltype(__do_test<is_convertible>(_FromArgs{}, _ToArgs{}));
                                                                                    ^
          detected during:
            instantiation of "std::__1::__tuple_sfinae_base::__do_test" based on template arguments <std::__1::is_convertible, const double &, const double &> at line 408
            instantiation of type "std::__1::__tuple_sfinae_base::__convertible<std::__1::__tuple_types<const double &>, std::__1::__tuple_types<const double &>>" at line 425
            instantiation of class "std::__1::__tuple_convertible<_Tp, _Up, true, true> [with _Tp=std::__1::tuple<const double &>, _Up=std::__1::__tuple_types<const double &>]" at line 520 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_explicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__tuple(422): error: not a class or struct name
      : public __tuple_sfinae_base::__convertible<
               ^
          detected during:
            instantiation of class "std::__1::__tuple_convertible<_Tp, _Up, true, true> [with _Tp=std::__1::tuple<const double &>, _Up=std::__1::__tuple_types<const double &>]" at line 520 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_explicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(520): error: class "std::__1::__tuple_convertible<std::__1::tuple<const double &>, std::__1::__tuple_types<const double &>, true, true>" has no member "value"
                  >::value &&
                     ^
          detected during:
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_explicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(538): error: class "std::__1::__tuple_convertible<std::__1::tuple<const double &>, std::__1::__tuple_types<const double &>, true, true>" has no member "value"
                  >::value &&
                     ^
          detected during:
            instantiation of "bool std::__1::tuple<_Tp...>::_CheckArgsConstructor<true, _Dummy>::__enable_implicit<_Args...>() [with _Tp=<const double &>, _Dummy=void, _Args=<const double &>]" at line 1104
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(1104): error: no instance of constructor "std::__1::tuple<_Tp...>::tuple [with _Tp=<const double &>]" matches the argument list
            argument types are: (const double)
      return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...);
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(869): note: this candidate was rejected because mismatch in count of arguments
          tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(855): note: this candidate was rejected because mismatch in count of arguments
          tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(842): note: this candidate was rejected because at least one template argument could not be deduced
          tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base, _Tuple>::value))
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(827): note: this candidate was rejected because at least one template argument could not be deduced
          tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base, _Tuple>::value))
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(808): note: this candidate was rejected because mismatch in count of arguments
          tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(788): note: this candidate was rejected because mismatch in count of arguments
          tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(761): note: this candidate was rejected because at least one template argument could not be deduced
          tuple(_Up&&... __u)
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(728): note: this candidate was rejected because at least one template argument could not be deduced
          tuple(_Up&&... __u)
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(702): note: this candidate was rejected because mismatch in count of arguments
        tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(682): note: this candidate was rejected because mismatch in count of arguments
        tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(664): note: this candidate was rejected because at least one template argument could not be deduced
      explicit tuple(const _Tp& ... __t) _NOEXCEPT_((__all<is_nothrow_copy_constructible<_Tp>::value...>::value))
               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(646): note: this candidate was rejected because at least one template argument could not be deduced
      tuple(const _Tp& ... __t) _NOEXCEPT_((__all<is_nothrow_copy_constructible<_Tp>::value...>::value))
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(630): note: this candidate was rejected because mismatch in count of arguments
      tuple(_AllocArgT, _Alloc const& __a)
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(621): note: this candidate was rejected because arguments do not match
      tuple(tuple&&) = default;
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(620): note: this candidate was rejected because arguments do not match
      tuple(tuple const&) = default;
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple(617): note: this candidate was rejected because mismatch in count of arguments
      _LIBCPP_CONSTEXPR tuple()
                        ^
          detected during:
            instantiation of "std::__1::tuple<_Tp &&...> std::__1::forward_as_tuple(_Tp &&...) [with _Tp=<const double &>]" at line 1368 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map"
            instantiation of "std::__1::map<_Key, _Tp, _Compare, _Allocator>::mapped_type &std::__1::map<_Key, _Tp, _Compare, _Allocator>::operator[](const std::__1::map<_Key, _Tp, _Compare, _Allocator>::key_type &) [with _Key=double, _Tp=double, _Compare=std::__1::less<double>, _Allocator=std::__1::allocator<std::__1::pair<const double, double>>]" at line 28 of "Map.cc"

compilation aborted for Map.cc (code 2)

Leaving out the -std=c++11 option makes this test compilable and runable. This same problem occurred for the Intel 17 version.

 

 

0 Kudos
4 Replies
JenniferJ
Moderator
385 Views

The XCode 9 is released after our 18.0 release, it is not officially supported yet. This issue is known and we're working on the fix. Please try the future 18.0 update.

thanks,

Jennifer

0 Kudos
MGRAV
New Contributor I
385 Views

Do we know when the update would be available ?

Mathieu

0 Kudos
JenniferJ
Moderator
385 Views

this issue has been fixed in the 18.0 update 1. 

thanks,

Jennifer 

0 Kudos
wjb
Beginner
385 Views

This still seems broken when trying to use Xcode 9.2 with Intel Composer 2018.1.031

0 Kudos
Reply