Skip to content

Can't build example script #11

@dancodes

Description

@dancodes

Using clang 6.0.1 I get the following error:

In file included from ./Ship.hpp:10:
In file included from ./Module.hpp:11:
./DamageVector.hpp:82:59: error: no template named 'is_arithmetic_v' in namespace 'std'; did you mean 'is_arithmetic'?
                template <typename T2, typename = std::enable_if_t<std::is_arithmetic_v<T2>>>

Am I missing something? My build line is

clang-6.0 -std=c++17 main.cpp

and main.cpp is

#include <iostream>
#include "dgmpp.hpp" 

using namespace dgmpp;

int main() {
	auto gang = Gang::Create();
	auto pilot = gang->addPilot();
	pilot->setSkillLevels(5);
	auto ship = pilot->ship(TypeID::dominix);

	auto ab = ship->addModule(TypeID::_100MNAfterburnerII);
	ab->state(Module::State::overloaded);

	std::cout << "Velocity: " << ship->velocity().count() << " m/s" << std::endl;

    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions