- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
a minimal example of the code I was trying to compile is
#include <type_traits> template <bool... Values> struct BoolStorage; template <bool... Values> struct all_true { static constexpr bool value = std::is_same<BoolStorage<Values..., true>, BoolStorage<true, Values...>>::value; }; template <bool... Values> struct enable_if_all : std::enable_if<all_true<Values...>::value> {}; template <int dim> class FiniteElement {}; template <int dim> class FESystem { public: template <class... FEPairs, typename = typename enable_if_all<(std::is_same<typename std::decay<FEPairs>::type, FiniteElement<dim>*>::value)... >::type> FESystem(FEPairs &&... fe_pairs) {} }; int main() { FiniteElement<2> fe; FESystem<2> fe_system(&fe, &fe); }
This should be C++11 compliant but I get the following errors with ICC18:
test_fe_system_constructor.cc(34): error: no instance of constructor "FESystem<dim>::FESystem [with dim=2]" matches the argument list
argument types are: (FiniteElement<2> *, FiniteElement<2> *)
FESystem<2> fe_system(&fe, &fe);
^
test_fe_system_constructor.cc(20): note: this candidate was rejected because mismatch in count of arguments
class FESystem
^
test_fe_system_constructor.cc(20): note: this candidate was rejected because mismatch in count of arguments
class FESystem
^
test_fe_system_constructor.cc(27): note: this candidate was rejected because at least one template argument could not be deduced
FESystem(FEPairs &&... fe_pairs)
^compilation aborted for test_fe_system_constructor.cc (code 2)
Best,
Daniel
- 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
Thanks for reporting a problem and provided a test case. I will report it to our developer.
Regards,
Viet Hoang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Daniel,
I filed a bug report: #CMPLRS-46357
Regards,
Viet Hoang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page