Как использовать tr1 с Visual Studio 2010 (tr1 ::функция )?

Как начать использовать функции tr1 Visual Studio 2010? Для более конкретного случая мне нужна функция std ::tr1 ::. Я попытался включить #include <tr1/functional>, который сообщает об отсутствии, в то время как #include <functional>включает нормально, но когда я устанавливаю это :

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 ';'

Если я использую boost, он работает нормально, но для этого проекта из-за использования определенного framework Мне потребуется версия Visual Studio tr1.

Как было предложено, пропуск 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 ';'
8
задан Speed 1 May 2012 в 19:33
поделиться