Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Deduced class template argument & fold expression syntax
Deduced class template argument & fold expression syntax [message #1830769] Mon, 03 August 2020 16:16
Maro Nary is currently offline Maro NaryFriend
Messages: 3
Registered: August 2020
Junior Member
I have some code like
// include ... & using std
template<typename ... T>
enable_if_t<(is_same_v<T, int> && ...)> test(T ... ts) { /* ... */ }
vector v{1, 2, 3, 4};
// main ...


where the test function uses a fold expression and the vector uses template argument deduction. These compile under gcc 10.1.0 with -std=c++17.

However Eclipse (I just updated to 2020-06) shows the fold expression as syntax error and gives a "Type ... could not be resolved" error for the vector. Is this a missing implementation in Eclipse itself or is it something wrong with my settings?

* If it is a limitation of Eclipse, is there any way I can at least disable these errors without turning them off completely or polluting my code with // @suppress comments? E.g. some regex for which syntax should not be checked?
* Alternatively a pointer to where one might implement this in the CDT would also be nice .. though I imagine this would be some work.
Previous Topic:SOLVED QGuiApplication missing in 2020=03
Next Topic:Eclipse CDT Python PyDev plug-in - where to enable icons ?
Goto Forum:
  


Current Time: Tue Oct 15 16:54:36 GMT 2024

Powered by FUDForum. Page generated in 0.03136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top