Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » c++ 17 support (std::invoke)
c++ 17 support [message #53868] Sat, 09 May 2020 23:21 Go to next message
michael79 is currently offline  michael79
Messages: 4
Registered: May 2020
Junior Member
Hi all.

As I read, C++ 17 is supported.
Can I use std::invoke from this standard?
Is there an analog for this in Upp?
Re: c++ 17 support [message #53877 is a reply to message #53868] Sun, 10 May 2020 17:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Depends on toolchain you are using.

It works with Visual C++. CLANG we ship with Win32 defaults to C++14. In linux it will depend on actual distro / compiler.

There is no equivalent in U++. Given that implementation seems rather trivial (https://en.cppreference.com/w/cpp/utility/functional/invoke), I would probably just put the copy into my code if I needed it...

Mirek
Re: c++ 17 support [message #53878 is a reply to message #53868] Sun, 10 May 2020 18:17 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
michael79 wrote on Sat, 09 May 2020 17:21

Can I use std::invoke from this standard?

You just need to change a default build method (or create a new build method) and set C++ version to 17.
For example, in case of Clang in "Common C++ options" replace -std=c++14 with -std=c++17.

Hope this helps.


Regards,
Novo

[Updated on: Sun, 10 May 2020 18:18]

Report message to a moderator

Re: c++ 17 support [message #53882 is a reply to message #53868] Sun, 10 May 2020 23:20 Go to previous message
michael79 is currently offline  michael79
Messages: 4
Registered: May 2020
Junior Member
Thanks for the answers. I'll try to use Function() with lambdas instead.
Previous Topic: [Proposal] RGB <-> CMYK conversion functions.
Next Topic: serialization
Goto Forum:
  


Current Time: Fri Apr 19 19:14:38 CEST 2024

Total time taken to generate the page: 0.04394 seconds