Skip to content

Commit

Permalink
Merge pull request microsoft#52 from trebconnell/addheaderguards
Browse files Browse the repository at this point in the history
Fix issue microsoft#39: Add header guards
  • Loading branch information
Neil MacIntosh committed Sep 25, 2015
2 parents 8ae77b1 + 51da136 commit b40d346
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/array_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#pragma once

#ifndef GSL_ARRAY_VIEW_H
#define GSL_ARRAY_VIEW_H

#include <new>
#include <stdexcept>
#include <cstddef>
Expand Down Expand Up @@ -2286,3 +2289,5 @@ general_array_view_iterator<ArrayView> operator+(typename general_array_view_ite
#endif // _MSC_VER <= 1800

#pragma pop_macro("_NOEXCEPT")

#endif // GSL_ARRAY_VIEW_H
5 changes: 5 additions & 0 deletions include/fail_fast.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#pragma once

#ifndef GSL_FAIL_FAST_H
#define GSL_FAIL_FAST_H

#include <exception>
#include <stdexcept>

Expand Down Expand Up @@ -45,3 +48,5 @@ inline void fail_fast_assert(bool cond, const char* const) { if (!cond) std::ter
#endif // SAFER_CPP_TESTING

}

#endif // GSL_FAIL_FAST_H
5 changes: 5 additions & 0 deletions include/gsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#pragma once

#ifndef GSL_GSL_H
#define GSL_GSL_H

#include "array_view.h" // array_view, strided_array_view...
#include "string_view.h" // zstring, string_view, zstring_builder...
#include <memory>
Expand Down Expand Up @@ -287,3 +290,5 @@ class maybe_null_ret
template<class T> using maybe_null = maybe_null_ret<T>;

} // namespace Guide

#endif // GSL_GSL_H
5 changes: 5 additions & 0 deletions include/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#pragma once

#ifndef GSL_STRING_VIEW_H
#define GSL_STRING_VIEW_H

#include "array_view.h"
#include <cstring>

Expand Down Expand Up @@ -176,3 +179,5 @@ using zstring_builder = basic_zstring_builder<char, Max>;
template <size_t Max = dynamic_range>
using wzstring_builder = basic_zstring_builder<wchar_t, Max>;
}

#endif // GSL_STRING_VIEW_H

0 comments on commit b40d346

Please sign in to comment.