Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

demo

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.52 sec, absolute service time: 0,65 sec 
edit mode |  history
Error(s):
source_file.cpp:15:5: error: static_assert failed "T must inherit from A and B."
    static_assert(std::is_base_of<A, T>::value && std::is_base_of<B, T>::value, "T must inherit from A and B.");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source_file.cpp:21:5: note: in instantiation of function template specialization 'testFunction<X>' requested here
    testFunction(X());
    ^
source_file.cpp:15:5: error: static_assert failed "T must inherit from A and B."
    static_assert(std::is_base_of<A, T>::value && std::is_base_of<B, T>::value, "T must inherit from A and B.");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source_file.cpp:22:5: note: in instantiation of function template specialization 'testFunction<Y>' requested here
    testFunction(Y());
    ^
source_file.cpp:15:5: error: static_assert failed "T must inherit from A and B."
    static_assert(std::is_base_of<A, T>::value && std::is_base_of<B, T>::value, "T must inherit from A and B.");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
source_file.cpp:23:5: note: in instantiation of function template specialization 'testFunction<Z>' requested here
    testFunction(Z());
    ^
3 errors generated.

        

    
                
λ
.NET NoSQL database for rapid development