Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 06:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



std::function of a function returning an std::function

Discussion on std::function of a function returning an std::function within the C/C++ forum part of the Coders Den category.

Reply
 
Old 11/10/2013, 18:01   #16
 
elite*gold: 0
Join Date: Aug 2012
Posts: 236
Received Thanks: 94
Quote:
Originally Posted by MrSm!th View Post
Dass obj.operator func()() nicht implizit funktionieren kann, war mir schon klar, da der () Operator auch sicherlich höhere Priorität hat als Konvertierungen (war zumindest mein Gedanke dabei).
operator() hat keine "Konvertierungs-Priorität". Aber laut [over.match.call] wird bei obj() nach [over.call.object] aufgelöst, und da steht, dass nur Konvertierungsfunktionen in Zeiger bzw. Referenzen auf Funktionen (also z. B. obj.operator void(*)() ()) neben obj.operator()() als brauchbare Funktionen überhaupt in Betracht gezogen werden.

Quote:
Originally Posted by Raz9r View Post
Unter Clang (OS X 10.9, Xcode 5, Apple LLVM 5.0) laufen übrigens alle 4 Fälle, wobei ich mir sicher bin, dass der erste nicht laufen sollte. Es zitiere bitte jemand den Standard und korrigiere mich!
Meinst du die Zuweisungsoperation (test=obj) oder die Initialisierung (func test=obj)?
Tasiro is offline  
Old 11/10/2013, 20:32   #17
 
Raz9r's Avatar
 
elite*gold: 297
Join Date: Dec 2010
Posts: 1,129
Received Thanks: 1,687
Quote:
Originally Posted by Tasiro View Post
Meinst du die Zuweisungsoperation (test=obj) oder die Initialisierung (func test=obj)?
Laufen beide ohne Probleme.
Raz9r is offline  
Old 11/10/2013, 20:56   #18
 
elite*gold: 0
Join Date: Aug 2012
Posts: 236
Received Thanks: 94
Quote:
Originally Posted by Raz9r View Post
Laufen beide ohne Probleme.
Also kein Zitat? Dann verweise ich hier für die Zukunft auf , da ist das ausführlich erklärt. Um es kurz zu machen: operator func() konvertiert ein testclass&, und func(testclass&) ist eine Template-Spezialisierung. MSVC ist blind oder will das nicht akzeptieren.
Tasiro is offline  
Old 11/11/2013, 17:52   #19


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Ok, nur falls es jemanden außer mir ebenfalls interessiert:
Mit dem Nov12 CTP sind Variadic Templates auch mit VS 2012 möglich.
MrSm!th is offline  
Old 11/11/2013, 22:28   #20
 
elite*gold: 0
Join Date: Aug 2012
Posts: 236
Received Thanks: 94
Aber leider darf das nur zu Testzwecken eingesetzt werden, bietet weniger Funktionen und mehr Fehler. Ich würde da eher VS 2013 empfehlen.
Tasiro is offline  
Reply


Similar Threads Similar Threads
Running Function 2 after Function 1 finished
09/15/2013 - AutoIt - 3 Replies
Hey, its me again. Im stuck on a problem since yesterday and as much as i hate to ask for help, i really dont know what else to try. I want Function 2 to run after Function 1 has finished. I tried GuiCtrlSetOnEvent and MsgLoop, but i dont really understand it. I tried to read tutorials but they didnt help at all. The line that are underline is what im talking about. I want gamestart() to run first and when its finished, i want iniviteteam() to run. #AutoIt3Wrapper_UseX64=n...
function
07/23/2012 - Rappelz Private Server - 4 Replies
Hi pepole Trying to make Lua Code But i cant find The Function to Open Store :D anyone can help l
Function Box
09/27/2011 - Combat Arms - 5 Replies
Hey undzwar hab ich eine frage von den DailyJob kriegt man ja auch eine Function box und wollte fragen ob man da nur wsachen für 1 day oder mehrere tage bekommen kann bedanke mcih schonmal für eure antworten :)
[VIP-function] ToxicSYS [VIP-function]
08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies
heeeey E-pvpers :pimp: this is a new hack by TSYS Status : UNDETECTED Functions (VIDEO) : YouTube - WarRock - Bikini event VIP hack
[HELP] Function
08/02/2010 - EO PServer Hosting - 2 Replies
Where can I find this function "gamecard> = 1" within my



All times are GMT +1. The time now is 06:06.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.