Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3044

Using template without an argument type

$
0
0
A program I'm working on seems to have a lot of functions like this in its header files:-

Code:

template <>
inline std::string to_string (bool val)
{
        std::string tmp;
        bool_to_string (val, tmp);
        return tmp;
}

How is that function any different from a regular inline function? i.e. does the empty template<> line add something special?

Viewing all articles
Browse latest Browse all 3044

Trending Articles