Commit 616c40d4 authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

simple test for explicit template instantiation

parent 9cb30fc2
cmake_minimum_required(VERSION 3.10)
project(explicit-templates)
set(CMAKE_CXX_STANDARD 14)
add_executable(main main.cpp)
target_sources(main PRIVATE Hund.cpp)
\ No newline at end of file
#include "Hund.hpp"
#include <iostream>
template< class FOO>
void Hund<FOO>::bar(){
bellen<FOO>();
}
template< class FOO>
void bellen(){
std::cout << "wuff" << std::endl;
}
template class Hund<double>;
//template void bellen<double>();
#pragma once
template< class FOO>
class Hund {
void bar();
};
template <class FOO>
void bellen();
//extern template void bellen<double>();
\ No newline at end of file
#include "Hund.hpp"
int main(){
Hund<double> hund();
bellen< double >();
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment