[ create a new paste ] login | about

Link: http://codepad.org/kUTBPWxh    [ raw code | fork ]

C++, pasted on Dec 27:
#include <vector>

namespace abc 
{
    namespace 
    {
        template<class T>
        void mysort(std::vector<T>& vec, size_t b, size_t m, size_t e) {}
    }

    template<class T> 
    void mysort(std::vector<T>& vec);

}

int main()
{
    using namespace abc;
    std::vector<int> vec(5);
    mysort(vec, 3, 2, 1); // it compiles and runs!!
    return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: