Skip to content

Commit

Permalink
Use consistent phrasing of required standard mode (#252)
Browse files Browse the repository at this point in the history
Fixes #250.
  • Loading branch information
SuperWig authored and StephanTLavavej committed Nov 5, 2019
1 parent d0d724f commit 9d635aa
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 38 deletions.
6 changes: 3 additions & 3 deletions stl/inc/any
Expand Up @@ -9,7 +9,9 @@
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <any> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <initializer_list>
#include <type_traits>
#include <typeinfo>
Expand Down Expand Up @@ -441,8 +443,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("class any is only available with C++17 or later.")
#endif // _HAS_CXX17

#endif // _STL_COMPILER_PREPROCESSOR
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/charconv
Expand Up @@ -9,7 +9,9 @@
#include <yvals.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <charconv> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <float.h>
#include <intrin0.h>
#include <string.h>
Expand Down Expand Up @@ -3097,8 +3099,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("The contents of <charconv> are only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _CHARCONV_
6 changes: 3 additions & 3 deletions stl/inc/compare
Expand Up @@ -9,7 +9,9 @@
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX20
#if !_HAS_CXX20
#pragma message("The contents of <compare> are available only with C++20 or later.")
#else // ^^^ !_HAS_CXX20 / _HAS_CXX20 vvv
#include <xtr1common>

#pragma pack(push, _CRT_PACKING)
Expand Down Expand Up @@ -475,8 +477,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ C++20 / not C++20 vvv
#pragma message("The contents of <compare> are only available with C++20 or later.")
#endif // _HAS_CXX20

#endif // _STL_COMPILER_PREPROCESSOR
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/concepts
Expand Up @@ -9,7 +9,9 @@
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR

#ifdef __cpp_lib_concepts
#ifndef __cpp_lib_concepts
#pragma message("The contents of <concepts> are available only with C++20 concepts support.")
#else // ^^^ !defined(__cpp_lib_concepts) / defined(__cpp_lib_concepts) vvv
#if defined(__clang__) && !defined(_SILENCE_CLANG_CONCEPTS_MESSAGE)
#error Despite the presence of some Clang-related bits, this header currently does not support Clang. \
You can define _SILENCE_CLANG_CONCEPTS_MESSAGE to silence this message and acknowledge that this is unsupported.
Expand Down Expand Up @@ -364,8 +366,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ <concepts> supported / <concepts> not supported vvv
#pragma message("The contents of <concepts> are only available with C++20 concepts support.")
#endif // __cpp_lib_concepts
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _CONCEPTS_
12 changes: 6 additions & 6 deletions stl/inc/execution
Expand Up @@ -9,7 +9,9 @@
#include <yvals.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <execution> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <algorithm>
#include <atomic>
#include <memory>
Expand Down Expand Up @@ -2839,10 +2841,10 @@ inline size_t _Get_stable_sort_tree_height(const size_t _Count, const size_t _Hw
// go to the next smaller power of 2
const auto _Count_max_tree_height = _Log_count_max_chunks & ~static_cast<size_t>(1);

const auto _Ideal_chunks = _Hw_threads * _Oversubscription_multiplier;
const size_t _Log_ideal_chunks = _Floor_of_log_2(_Ideal_chunks);
const auto _Ideal_chunks = _Hw_threads * _Oversubscription_multiplier;
const size_t _Log_ideal_chunks = _Floor_of_log_2(_Ideal_chunks);
#ifdef _WIN64
const size_t _Max_tree_height = 62; // to avoid ptrdiff_t overflow
const size_t _Max_tree_height = 62; // to avoid ptrdiff_t overflow
#else // ^^^ _WIN64 ^^^ // vvv !_WIN64 vvv
const size_t _Max_tree_height = 30;
#endif // _WIN64
Expand Down Expand Up @@ -5137,8 +5139,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("Parallel algorithms are only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _EXECUTION_
6 changes: 3 additions & 3 deletions stl/inc/filesystem
Expand Up @@ -9,7 +9,9 @@
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <filesystem> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <algorithm>
#include <chrono>
#include <cwchar>
Expand Down Expand Up @@ -4330,8 +4332,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("The contents of <filesystem> are only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _FILESYSTEM_
6 changes: 3 additions & 3 deletions stl/inc/memory_resource
Expand Up @@ -9,7 +9,9 @@
#include <yvals.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <memory_resource> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <vector>
#include <xbit_ops.h>
#include <xpolymorphic_allocator.h>
Expand Down Expand Up @@ -755,8 +757,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("The contents of <memory_resource> are only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _MEMORY_RESOURCE_
6 changes: 3 additions & 3 deletions stl/inc/optional
Expand Up @@ -8,7 +8,9 @@
#define _OPTIONAL_
#include <yvals.h>
#if _STL_COMPILER_PREPROCESSOR
#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <optional> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <exception>
#include <initializer_list>
#include <type_traits>
Expand Down Expand Up @@ -637,8 +639,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("class template optional is only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _OPTIONAL_
6 changes: 3 additions & 3 deletions stl/inc/ranges
Expand Up @@ -8,7 +8,9 @@
#define _RANGES_
#include <yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR
#ifdef __cpp_lib_concepts
#ifndef __cpp_lib_concepts
#pragma message("The contents of <ranges> are available only with C++20 concepts support.")
#else // ^^^ !defined(__cpp_lib_concepts) / defined(__cpp_lib_concepts) vvv
#include <iterator>

#pragma pack(push, _CRT_PACKING)
Expand All @@ -34,8 +36,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)
#else // ^^^ Concepts support / no Concepts vvv
#pragma message("The contents of <ranges> are only available with C++20 concepts support.")
#endif // __cpp_lib_concepts
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _RANGES_
6 changes: 3 additions & 3 deletions stl/inc/string_view
Expand Up @@ -9,10 +9,10 @@
#include <yvals.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <string_view> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <xstring>
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#pragma message("string_view is only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _STRING_VIEW_
9 changes: 4 additions & 5 deletions stl/inc/variant
Expand Up @@ -9,7 +9,9 @@
#include <yvals.h>
#if _STL_COMPILER_PREPROCESSOR

#if _HAS_CXX17
#if !_HAS_CXX17
#pragma message("The contents of <variant> are available only with C++17 or later.")
#else // ^^^ !_HAS_CXX17 / _HAS_CXX17 vvv
#include <exception>
#include <initializer_list>
#include <type_traits>
Expand Down Expand Up @@ -1156,7 +1158,7 @@ public:
(void) _That_ref; // TRANSITION, VSO-486357
constexpr size_t _That_idx = decltype(_That_ref)::_Idx;
#ifdef __EDG__ // TRANSITION, VSO-657455
constexpr size_t _My_idx = decltype(_My_ref)::_Idx + 0 * _That_idx;
constexpr size_t _My_idx = decltype(_My_ref)::_Idx + 0 * _That_idx;
#else // ^^^ workaround ^^^ / vvv no workaround vvv
constexpr size_t _My_idx = decltype(_My_ref)::_Idx;
#endif // TRANSITION, VSO-657455
Expand Down Expand Up @@ -1749,9 +1751,6 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)

#else // ^^^ _HAS_CXX17 ^^^ / vvv !_HAS_CXX17 vvv
#pragma message("class template variant is only available with C++17 or later.")
#endif // _HAS_CXX17
#endif // _STL_COMPILER_PREPROCESSOR
#endif // _VARIANT_

0 comments on commit 9d635aa

Please sign in to comment.