locked
How to resolve error C3986: signature of member contains native type 'Concurrency::task<void>' RRS feed

  • Question

  • Hi all,

    I want add a task<void> to .h file.
    Following these action, it will get the 「error C3986:  signature of member contains native type 'Concurrency::task<void>'」

    1. Create new project, File -> New -> Project -> Blank Application
    2. Add "#include <ppltasks.h>" and "using namespace Concurrency" to .h file
    3. Add "task<void> testLogin();" to public: scope
    4. Compile
    5. Show the error code "error C3986: 'testLogin': signature of member contains native type 'Concurrency::task<void>' "

    #include "pch.h"
    #include "BlankPage.g.h"
    #include <ppltasks.h>
    using namespace Concurrency;
    
    namespace Application1
    {
    	public ref class BlankPage sealed
    	{
    	public:
    		BlankPage();
    		task<void> testLogin();
    	protected:
    		virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
    	};
    }

    But, if move "task<void> testLogin();" to private: scope
    It will fine.

    Why?
    Is there limitation for declare "task<void>" or I have mistake?

    Thanks

    Tuesday, June 5, 2012 11:36 AM

Answers