Q:

std::map design: why map accept comparator as template parameter

Map type from STL have next type:  
std::map< Key, Data, Compare, Alloc >

As one of template parameters we could pass Compare predicate, why map accept this predicate as template parameter and not as object in constructor?  
It could has more flexible interface with something like boost::function< bool, const T&, const T& > in constructor.
Ofcourse I'm understend that when STL was designed boost does not exists, but designers could be create something similar on boost::function.  
I belive it has some deep reasons.
EDITED
Sorry for dummy question, map have same posibility :)
My question doesn't have sense after your answers.

A:

The template argument is the type of the predicate, not the value. The value can be provided as an argument to the constructor. You can specify any value that matches the type. As given, the default type is std::less<Key>, which pretty much only has one value, but you should be able to specify your own type for the Compare argument, including boost::function, and then use various values to control the behavior of your map objects.

A:

Map DOES have such a constructor. From section 23.3.1 of the C++ Standard:
explicit map(const Compare& comp = Compare(),
const Allocator& = Allocator());

A:

Because boost::function is polymorphic, it cannot be inlined. The design of the STL is aimed at maximum potential for the compiler to do inlining of code, which is easy on expanded templates; also you could easily make the decision to use boost::function to supply the comparison with std::map if you needed it to be polymorphic.

