Boost logo

Boost :

From: Alexey Bakhvalov (bakhvalov_at_[hidden])
Date: 2005-09-09 06:36:27


The following example doesn't compile under VC7.1 and VC8.0b2:

[code]

#include <boost/assign/list_of.hpp>
#include <boost/assert.hpp>
#include <map>

using namespace std;

template<class T>
void func1()
{
}

template<class T>
void func2()
{
}

void func()
{
}

int _tmain(int argc, _TCHAR* argv[])
{
    typedef void (*TFunc)();
    map<const wchar_t *, TFunc> next = boost::assign::map_list_of<const
wchar_t *, TFunc>
        (L"test1", &func1<char>)
        (L"test2", &func2<char>)
    ;
}

[/code]

But if I replace
    (L"test2", &func2<char>)
with
    (L"test2", &func)
or
    (std::make_pair(L"test2", &func2<char>))
then everything works fine.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk