Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil MacIntosh <neilmac@microsoft.com>2016-08-10 04:14:11 +0300
committerNeil MacIntosh <neilmac@microsoft.com>2016-08-10 04:14:11 +0300
commit5ebfc16f14044a2edec68813b22b826e7bfbf9ee (patch)
treeffdbfb286b986aba7522df26cd6a0cde069750fc
parentf9f08a56fa08addbd96ab90430735e4e044a3af1 (diff)
parent92fdde29192a1eef3e3e13035109f0456aea3ac2 (diff)
Merge branch 'master' into dev/neilmac/spans_in_maps
-rw-r--r--CMakeLists.txt8
-rw-r--r--README.md25
-rw-r--r--gsl/gsl.h (renamed from include/gsl.h)0
-rw-r--r--gsl/gsl_assert.h (renamed from include/gsl_assert.h)0
-rw-r--r--gsl/gsl_byte.h (renamed from include/gsl_byte.h)0
-rw-r--r--gsl/gsl_util.h (renamed from include/gsl_util.h)0
-rw-r--r--gsl/multi_span.h (renamed from include/multi_span.h)0
-rw-r--r--gsl/span.h (renamed from include/span.h)5
-rw-r--r--gsl/string_span.h (renamed from include/string_span.h)0
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/assertion_tests.cpp2
-rw-r--r--tests/at_tests.cpp2
-rw-r--r--tests/bounds_tests.cpp2
-rw-r--r--tests/byte_tests.cpp2
-rw-r--r--tests/multi_span_tests.cpp2
-rw-r--r--tests/notnull_tests.cpp2
-rw-r--r--tests/owner_tests.cpp2
-rw-r--r--tests/span_tests.cpp2
-rw-r--r--tests/strided_span_tests.cpp2
-rw-r--r--tests/string_span_tests.cpp2
-rw-r--r--tests/utils_tests.cpp2
21 files changed, 41 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7397fe2..ba85857 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,10 +3,10 @@ cmake_minimum_required(VERSION 2.8.7)
project(GSL CXX)
set(GSL_HEADERS
- "include/gsl.h"
- "include/gsl_assert.h"
- "include/span.h"
- "include/string_span.h"
+ "gsl/gsl.h"
+ "gsl/gsl_assert.h"
+ "gsl/span.h"
+ "gsl/string_span.h"
)
include_directories(
diff --git a/README.md b/README.md
index 3c440c2..f54b0c5 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,10 @@ This repo contains Microsoft's implementation of GSL.
The library includes types like `span<T>`, `string_span`, `owner<>` and others.
-The entire implementation is provided inline in the headers under the [include](./include) directory. The implementation generally assumes a platform that implements C++14 support. There are specific workarounds to support MSVC 2013 and 2015.
+The entire implementation is provided inline in the headers under the [gsl](./gsl) directory. The implementation generally assumes a platform that implements C++14 support. There are specific workarounds to support MSVC 2013 and 2015.
-While some types have been broken out into their own headers (e.g. [include/span.h](./include/span.h)),
-it is simplest to just include [gsl.h](./include/gsl.h) and gain access to the entire library.
+While some types have been broken out into their own headers (e.g. [gsl/span.h](./gsl/span.h)),
+it is simplest to just include [gsl/gsl.h](./gsl/gsl.h) and gain access to the entire library.
> NOTE: We encourage contributions that improve or refine any of the types in this library as well as ports to
other platforms. Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more information about contributing.
@@ -66,5 +66,20 @@ All tests should pass - indicating your platform is fully supported and you are
## Using the libraries
As the types are entirely implemented inline in headers, there are no linking requirements.
-Just place the contents of the [include](./include) directory within your source tree so it is available
-to your compiler, then include the appropriate headers in your program, and away you go!
+You can copy the [gsl](./gsl) directory into your source tree so it is available
+to your compiler, then include the appropriate headers in your program.
+
+Alternatively set your compiler's *include path* flag to point to the GSL development folder (`c:\GSL` in the example above) or installation folder (after running the install). Eg.
+
+MSVC++
+
+ /I c:\GSL
+
+GCC/clang
+
+ -I$HOME/dev/GSL
+
+
+Include the library using:
+
+ #include <gsl/gsl.h>
diff --git a/include/gsl.h b/gsl/gsl.h
index 8e00a44..8e00a44 100644
--- a/include/gsl.h
+++ b/gsl/gsl.h
diff --git a/include/gsl_assert.h b/gsl/gsl_assert.h
index 10de31a..10de31a 100644
--- a/include/gsl_assert.h
+++ b/gsl/gsl_assert.h
diff --git a/include/gsl_byte.h b/gsl/gsl_byte.h
index 5a9c327..5a9c327 100644
--- a/include/gsl_byte.h
+++ b/gsl/gsl_byte.h
diff --git a/include/gsl_util.h b/gsl/gsl_util.h
index 92a795b..92a795b 100644
--- a/include/gsl_util.h
+++ b/gsl/gsl_util.h
diff --git a/include/multi_span.h b/gsl/multi_span.h
index c883fb0..c883fb0 100644
--- a/include/multi_span.h
+++ b/gsl/multi_span.h
diff --git a/include/span.h b/gsl/span.h
index a5d2823..1405aa9 100644
--- a/include/span.h
+++ b/gsl/span.h
@@ -814,10 +814,13 @@ as_writeable_bytes(span<ElementType, Extent> s) noexcept
#undef noexcept
#ifdef _MSC_VER
-#pragma warning(pop)
#pragma pop_macro("noexcept")
#endif
#endif // GSL_THROW_ON_CONTRACT_VIOLATION
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // GSL_SPAN_H
diff --git a/include/string_span.h b/gsl/string_span.h
index e18e07a..e18e07a 100644
--- a/include/string_span.h
+++ b/gsl/string_span.h
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 79931f7..4a59470 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -9,7 +9,7 @@ endif()
add_subdirectory(unittest-cpp)
include_directories(
- ../include
+ ..
./unittest-cpp
)
@@ -33,7 +33,7 @@ else()
endif()
function(add_gsl_test name)
- add_executable(${name} ${name}.cpp ../include/gsl.h ../include/gsl_assert.h ../include/gsl_util.h ../include/multi_span.h ../include/span.h ../include/string_span.h)
+ add_executable(${name} ${name}.cpp ../gsl/gsl.h ../gsl/gsl_assert.h ../gsl/gsl_util.h ../gsl/multi_span.h ../gsl/span.h ../gsl/string_span.h)
target_link_libraries(${name} UnitTest++)
install(TARGETS ${name}
RUNTIME DESTINATION bin
diff --git a/tests/assertion_tests.cpp b/tests/assertion_tests.cpp
index acd381a..4ac1856 100644
--- a/tests/assertion_tests.cpp
+++ b/tests/assertion_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <gsl.h>
+#include <gsl/gsl.h>
using namespace gsl;
diff --git a/tests/at_tests.cpp b/tests/at_tests.cpp
index 1a9f814..53d93d1 100644
--- a/tests/at_tests.cpp
+++ b/tests/at_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <gsl.h>
+#include <gsl/gsl.h>
#include <vector>
#include <initializer_list>
diff --git a/tests/bounds_tests.cpp b/tests/bounds_tests.cpp
index 736a85c..7d5a071 100644
--- a/tests/bounds_tests.cpp
+++ b/tests/bounds_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <multi_span.h>
+#include <gsl/multi_span.h>
#include <vector>
using namespace std;
diff --git a/tests/byte_tests.cpp b/tests/byte_tests.cpp
index 5d4e7f6..183bebf 100644
--- a/tests/byte_tests.cpp
+++ b/tests/byte_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <gsl_byte.h>
+#include <gsl/gsl_byte.h>
#include <iostream>
#include <list>
diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp
index 003d236..b2e5b5f 100644
--- a/tests/multi_span_tests.cpp
+++ b/tests/multi_span_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <multi_span.h>
+#include <gsl/multi_span.h>
#include <iostream>
#include <list>
diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp
index 67b478a..bc12e9b 100644
--- a/tests/notnull_tests.cpp
+++ b/tests/notnull_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <gsl.h>
+#include <gsl/gsl.h>
#include <vector>
using namespace gsl;
diff --git a/tests/owner_tests.cpp b/tests/owner_tests.cpp
index 47c223a..3c82022 100644
--- a/tests/owner_tests.cpp
+++ b/tests/owner_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <gsl.h>
+#include <gsl/gsl.h>
#include <functional>
using namespace gsl;
diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp
index 8c9829d..fb20f77 100644
--- a/tests/span_tests.cpp
+++ b/tests/span_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <span.h>
+#include <gsl/span.h>
#include <iostream>
#include <list>
diff --git a/tests/strided_span_tests.cpp b/tests/strided_span_tests.cpp
index b81a5e7..4c07670 100644
--- a/tests/strided_span_tests.cpp
+++ b/tests/strided_span_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <multi_span.h>
+#include <gsl/multi_span.h>
#include <string>
#include <vector>
diff --git a/tests/string_span_tests.cpp b/tests/string_span_tests.cpp
index ca60e4b..3eeacb0 100644
--- a/tests/string_span_tests.cpp
+++ b/tests/string_span_tests.cpp
@@ -16,7 +16,7 @@
#include <UnitTest++/UnitTest++.h>
#include <cstdlib>
-#include <string_span.h>
+#include <gsl/string_span.h>
#include <vector>
#include <map>
diff --git a/tests/utils_tests.cpp b/tests/utils_tests.cpp
index 11582de..8c98223 100644
--- a/tests/utils_tests.cpp
+++ b/tests/utils_tests.cpp
@@ -15,7 +15,7 @@
///////////////////////////////////////////////////////////////////////////////
#include <UnitTest++/UnitTest++.h>
-#include <gsl.h>
+#include <gsl/gsl.h>
#include <functional>
using namespace gsl;