TartanLlama / ranges

Ranges that didn't make C++20
Creative Commons Zero v1.0 Universal
83 stars 5 forks source link

Idempotent headers #19

Open davidhunter22 opened 2 years ago

davidhunter22 commented 2 years ago

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