विज़ुअल स्टूडियो 2010 की tr1 सुविधाओं का उपयोग कैसे शुरू करता है? एक और विशिष्ट मामले के लिए, मुझे std :: tr1 :: फ़ंक्शन की आवश्यकता होती है। मैं #include <tr1/functional>
जो लापता के रूप में जानकारी दी है, जबकि #include <functional>
ठीक भी शामिल है सहित कोशिश की, लेकिन जब मैं इस सेट:विजुअल स्टूडियो 2010 (tr1 :: function) के साथ tr1 का उपयोग कैसे करें?
std::tr1::function<void(void)> callback;
मैं:
1>d:\marmalade\projects\core\src\button.h(21): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>d:\marmalade\projects\core\src\button.h(21): error C2039: 'function' : is not a member of '_STL'
1>d:\marmalade\projects\core\src\button.h(21): error C2143: syntax error : missing ';' before '<'
1>d:\marmalade\projects\core\src\button.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\marmalade\projects\core\src\button.h(21): error C2238: unexpected token(s) preceding ';'
अगर मैं बढ़ावा उपयोग करें, यह ठीक काम करता है, लेकिन इस परियोजना के लिए , एक विशिष्ट ढांचे का उपयोग करने के कारण मुझे विजुअल स्टूडियो टी 1 संस्करण की आवश्यकता होगी।
के रूप में, सुझाव tr1 लंघन, अब भी वही परिणाम देता है:
std::function<void(void)> callback;
1>d:\marmalade\projects\core\src\button.h(20): error C2039: 'function' : is not a member of '_STL'
1>d:\marmalade\projects\core\src\button.h(20): error C2143: syntax error : missing ';' before '<'
1>d:\marmalade\projects\core\src\button.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\marmalade\projects\core\src\button.h(20): error C2238: unexpected token(s) preceding ';'
'tr1' [तकनीकी रिपोर्ट 1] (http://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1) के लिए खड़ा है जो सी ++ मानक में प्रस्तावित परिवर्धन की एक सूची थी। एक बार प्रस्ताव स्वीकार किए जाने के बाद, 'tr1' पदनाम अप्रचलित हो गया। –
क्या आपने 'शामिल किया था? –
हां, मैंने इसे शामिल किया था। – Speed