mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Restructure header files.
This should prevent the tests from being recompiled.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
#include "solutions.hpp"
|
||||
#include "days.hpp"
|
||||
|
||||
// Currently an implementation of 2018 day 1
|
||||
void aoc2019::day01_part1(std::istream &input, std::ostream &output) {
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
#include <iosfwd>
|
||||
|
||||
namespace aoc2019 {
|
||||
typedef void (*solution_t)(std::istream &, std::ostream &);
|
||||
|
||||
solution_t get_implementation(int day, bool part2 = false);
|
||||
|
||||
// Declarations of all implemented days.
|
||||
void day01_part1(std::istream &input, std::ostream &output);
|
||||
void day01_part2(std::istream &input, std::ostream &output);
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <array>
|
||||
#include "solutions.hpp"
|
||||
#include "days.hpp"
|
||||
#include "implementations.hpp"
|
||||
|
||||
constexpr const std::array<std::array<aoc2019::solution_t, 2>, 25> SOLUTIONS = {
|
||||
{aoc2019::day01_part1, aoc2019::day01_part2}
|
||||
9
2019/src/implementations.hpp
Normal file
9
2019/src/implementations.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace aoc2019 {
|
||||
typedef void (*solution_t)(std::istream &, std::ostream &);
|
||||
|
||||
solution_t get_implementation(int day, bool part2 = false);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "solutions.hpp"
|
||||
#include "implementations.hpp"
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
Reference in New Issue
Block a user