-2

For my code

template Signal<float>;
template Signal<bit_t>;
template Signal<byte_t>;
template Signal< std::complex<float> >;
template Signal< int >;

I get compilation errors

error at signal_T.cpp:437: error: expected unqualified-id before â;â token
signal_T.cpp:438: error: expected unqualified-id before â;â token
signal_T.cpp:439: error: expected unqualified-id before â;â token
signal_T.cpp:440: error: expected unqualified-id before â;â token
signal_T.cpp:441: error: expected unqualified-id before â;â token

What does the compiler want to tell me?

How can I fix these errors?

anatolyg
  • 26,506
  • 9
  • 60
  • 134
ponnu
  • 31
  • 1

1 Answers1

9

What is your intent in writing lines such as:

template Signal<float>;

Are you trying to do explicit template instantiation? If so, assuming Signal is a class template, you need to change that to:

// Instantiate Signal with type float
template class Signal<float>;

If you're trying to do something else, please ask a question.

R Samuel Klatchko
  • 74,869
  • 16
  • 134
  • 187