TartanLlama/ranges

Idempotent headers

Opened this issue · 0 comments

Hi, Currenly the test programs include stuff before they include the header of the view they are testing I.E.

#include <catch2/catch.hpp>
#include <vector>
#include <iostream>
#include "tl/chunk.hpp"
#include "tl/to.hpp"
#include "tl/enumerate.hpp"

in chunk.cpp. It would good to include the view you are testing first to make sure the header for that vierw is idempotent I.E

#include "tl/chunk.hpp"  // Make sure this does not depend on things it does not include
#include "tl/to.hpp"
#include "tl/enumerate.hpp"
#include <catch2/catch.hpp>
#include <vector>
#include <iostream>

Let me know if you agree and I will create a pull request