RAD Studio |  |

E2487: Cannot specify default function arguments for explicit specializations (C++)

An explicit specialization of a function may not declare default function arguments. For example:

Copy Code

    template<class T>
    void foo(T a);
    template<>
    void foo<int>(int a = 10);// error: default value not allowed

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!