- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Test driver: f=moreThanOne.cpp icpc=/usr/local/packages/icc_remote/17.0.8.066/bin/icpc wget http://raw.githubusercontent.com/martinmoene/expected-lite/master/include/nonstd/expected.hpp g++ --version g++ -O3 -Wall -std=c++11 -c $f # ==================================================================" $icpc --version $icpc -std=c++11 -c $f
-----
test program:
$ cat moreThanOne.cpp #include "expected.hpp" using myret = nonstd::expected<int, int>; myret f1( int a ) { if( a ) return a; else return nonstd::make_unexpected( -1 ); } myret f2( int a ) { if( a ) return a; else return nonstd::make_unexpected( -1 ); } int main(int argc, char **argv) { myret rv; rv = f1( 1 ); rv = f2( 2 ); return 0; }
------
output:
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16.0.3)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ g++ -O3 -Wall -std=c++11 -c moreThanOne.cpp
+ /usr/local/packages/icc_remote/17.0.8.066/bin/icpc --version
icpc (ICC) 17.0.8 20180907
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
+ /usr/local/packages/icc_remote/17.0.8.066/bin/icpc -std=c++11 -c moreThanOne.cpp
expected.hpp(352): error: more than one instance of overloaded function "nonstd::expected_lite::std17::detail::is_nothrow_swappable::test" matches the argument list:
function template "bool nonstd::expected_lite::std17::detail::is_nothrow_swappable::test<T>()"
function template "std::false_type nonstd::expected_lite::std17::detail::is_nothrow_swappable::test<<unnamed>>(...)"
static auto test( int ) -> std::integral_constant<bool, test<T>()>{}
^
detected during:
instantiation of "nonstd::expected_lite::std17::detail::is_nothrow_swappable::test" based on template argument <int &> at line 366
instantiation of class "nonstd::expected_lite::std17::is_nothrow_swappable<T> [with T=int &]" at line 1461
instantiation of "std::enable_if<<expression>, void>::type nonstd::expected_lite::expected<T, E>::swap(nonstd::expected_lite::expected<T, E> &) [with T=int, E=int]" at line 1388
instantiation of "std::enable_if<<expression>, nonstd::expected_lite::expected<T, E> &>::type nonstd::expected_lite::expected<T, E>::operator=(nonstd::expected_lite::expected<T, E> &&) [with T=int, E=int]" at line 18 of "moreThanOne.cpp"
expected.hpp(1461): error: class "nonstd::expected_lite::std17::is_nothrow_swappable<int &>" has no member "value"
std::is_nothrow_move_constructible<T>::value && std17::is_nothrow_swappable<T&>::value &&
^
detected during:
instantiation of "std::enable_if<<expression>, void>::type nonstd::expected_lite::expected<T, E>::swap(nonstd::expected_lite::expected<T, E> &) [with T=int, E=int]" at line 1388
instantiation of "std::enable_if<<expression>, nonstd::expected_lite::expected<T, E> &>::type nonstd::expected_lite::expected<T, E>::operator=(nonstd::expected_lite::expected<T, E> &&) [with T=int, E=int]" at line 18 of "moreThanOne.cpp"
expected.hpp(1462): error: class "nonstd::expected_lite::std17::is_nothrow_swappable<int &>" has no member "value"
std::is_nothrow_move_constructible<E>::value && std17::is_nothrow_swappable<E&>::value
^
detected during:
instantiation of "std::enable_if<<expression>, void>::type nonstd::expected_lite::expected<T, E>::swap(nonstd::expected_lite::expected<T, E> &) [with T=int, E=int]" at line 1388
instantiation of "std::enable_if<<expression>, nonstd::expected_lite::expected<T, E> &>::type nonstd::expected_lite::expected<T, E>::operator=(nonstd::expected_lite::expected<T, E> &&) [with T=int, E=int]" at line 18 of "moreThanOne.cpp"
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank for reporting this problem. We will investigate it and update you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've filed this bug #CMPLRIL0-31535 internally.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page