Skip to content

Instantly share code, notes, and snippets.

@MrQubo
Last active December 2, 2018 13:39
Show Gist options
  • Select an option

  • Save MrQubo/fb945c2c580bff77691322a5b628582e to your computer and use it in GitHub Desktop.

Select an option

Save MrQubo/fb945c2c580bff77691322a5b628582e to your computer and use it in GitHub Desktop.
O co chodzi?
$ clang -Wall -Wextra -std=c++17 -O2 commonfleet.o rebelfleet.o commonfleet.o rebelfleet.o test.cc -o test
/usr/bin/ld: /tmp/test-394cbc.o: in function `main':
test.cc:(.text+0x2e): undefined reference to `RebelArmedStarship<float, 299796ll, 2997960ll>::RebelArmedStarship(float, float, float)'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
template <typename U, ssize_t MIN_SPEED, ssize_t MAX_SPEED>
RebelArmedStarship<U, MIN_SPEED, MAX_SPEED>::
RebelArmedStarship(valueType shield, valueType speed, valueType attackPower) :
RebelStarshipBase<U, ArmedStarship<U>, MIN_SPEED, MAX_SPEED>(
speed, shield, attackPower)
{ }
template <typename U, ssize_t MIN_SPEED, ssize_t MAX_SPEED>
class RebelArmedStarship :
private RebelStarshipBase<U, ArmedStarship<U>, MIN_SPEED, MAX_SPEED>
{
public:
using typename RebelStarshipBase<U, ArmedStarship<U>, MIN_SPEED, MAX_SPEED>::
valueType;
RebelArmedStarship(valueType shield, valueType speed, valueType attackPower);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment