Showing preview only (4,646K chars total). Download the full file or copy to clipboard to get everything.
Repository: microsoft/cpprestsdk
Branch: master
Commit: 0b1ce318a757
Files: 432
Total size: 4.4 MB
Directory structure:
gitextract_wcms9_8e/
├── .clang-format
├── .gitignore
├── .gitmodules
├── .vscode/
│ ├── launch.json
│ └── settings.json
├── Build_android/
│ ├── configure.sh
│ └── openssl/
│ ├── Makefile
│ ├── openssl-1.0.2k.patch
│ ├── openssl-1.0.2l.patch
│ ├── openssl-1.0.2m.patch
│ ├── openssl-1.0.2n.patch
│ ├── openssl-1.1.0g.patch
│ └── openssl-1.1.0j.patch
├── Build_iOS/
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── README.md
│ └── configure.sh
├── CMakeLists.txt
├── CONTRIBUTORS.txt
├── README.md
├── Release/
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── cmake/
│ │ ├── cpprest_find_boost.cmake
│ │ ├── cpprest_find_brotli.cmake
│ │ ├── cpprest_find_openssl.cmake
│ │ ├── cpprest_find_websocketpp.cmake
│ │ ├── cpprest_find_winhttppal.cmake
│ │ ├── cpprest_find_zlib.cmake
│ │ ├── cpprestsdk-config-version.in.cmake
│ │ └── cpprestsdk-config.in.cmake
│ ├── include/
│ │ ├── cpprest/
│ │ │ ├── astreambuf.h
│ │ │ ├── asyncrt_utils.h
│ │ │ ├── base_uri.h
│ │ │ ├── containerstream.h
│ │ │ ├── details/
│ │ │ │ ├── SafeInt3.hpp
│ │ │ │ ├── basic_types.h
│ │ │ │ ├── cpprest_compat.h
│ │ │ │ ├── fileio.h
│ │ │ │ ├── http_helpers.h
│ │ │ │ ├── http_server.h
│ │ │ │ ├── http_server_api.h
│ │ │ │ ├── nosal.h
│ │ │ │ ├── resource.h
│ │ │ │ └── web_utilities.h
│ │ │ ├── filestream.h
│ │ │ ├── http_client.h
│ │ │ ├── http_compression.h
│ │ │ ├── http_headers.h
│ │ │ ├── http_listener.h
│ │ │ ├── http_msg.h
│ │ │ ├── interopstream.h
│ │ │ ├── json.h
│ │ │ ├── oauth1.h
│ │ │ ├── oauth2.h
│ │ │ ├── producerconsumerstream.h
│ │ │ ├── rawptrstream.h
│ │ │ ├── streams.h
│ │ │ ├── uri.h
│ │ │ ├── uri_builder.h
│ │ │ ├── version.h
│ │ │ ├── ws_client.h
│ │ │ └── ws_msg.h
│ │ └── pplx/
│ │ ├── pplx.h
│ │ ├── pplxcancellation_token.h
│ │ ├── pplxconv.h
│ │ ├── pplxinterface.h
│ │ ├── pplxlinux.h
│ │ ├── pplxtasks.h
│ │ ├── pplxwin.h
│ │ └── threadpool.h
│ ├── public_apis_doxyfile
│ ├── samples/
│ │ ├── .gitignore
│ │ ├── BingRequest/
│ │ │ ├── CMakeLists.txt
│ │ │ └── bingrequest.cpp
│ │ ├── BlackJack/
│ │ │ ├── BlackJack_Client/
│ │ │ │ ├── BlackJackClient.cpp
│ │ │ │ └── CMakeLists.txt
│ │ │ ├── BlackJack_Server/
│ │ │ │ ├── BlackJack_Server.cpp
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── Dealer.cpp
│ │ │ │ ├── Table.cpp
│ │ │ │ ├── Table.h
│ │ │ │ ├── messagetypes.h
│ │ │ │ ├── stdafx.cpp
│ │ │ │ └── stdafx.h
│ │ │ ├── BlackJack_UIClient/
│ │ │ │ ├── App.xaml
│ │ │ │ ├── App.xaml.cpp
│ │ │ │ ├── App.xaml.h
│ │ │ │ ├── CardShape.xaml
│ │ │ │ ├── CardShape.xaml.cpp
│ │ │ │ ├── CardShape.xaml.h
│ │ │ │ ├── Common/
│ │ │ │ │ └── StandardStyles.xaml
│ │ │ │ ├── Package.appxmanifest
│ │ │ │ ├── Package.uwp.appxmanifest
│ │ │ │ ├── Player.xaml
│ │ │ │ ├── Player.xaml.cpp
│ │ │ │ ├── Player.xaml.h
│ │ │ │ ├── PlayingTable.xaml
│ │ │ │ ├── PlayingTable.xaml.cpp
│ │ │ │ ├── PlayingTable.xaml.h
│ │ │ │ ├── messagetypes.h
│ │ │ │ ├── pch.cpp
│ │ │ │ └── pch.h
│ │ │ └── CMakeLists.txt
│ │ ├── CMakeLists.txt
│ │ ├── CasaLens/
│ │ │ ├── AppCode.html
│ │ │ ├── CasaLens141/
│ │ │ │ ├── AppCode.html
│ │ │ │ ├── css/
│ │ │ │ │ └── default.css
│ │ │ │ └── js/
│ │ │ │ └── default.js
│ │ │ ├── ReadMe.txt
│ │ │ ├── casalens.cpp
│ │ │ ├── casalens.h
│ │ │ ├── css/
│ │ │ │ └── default.css
│ │ │ ├── datafetcher.cpp
│ │ │ ├── js/
│ │ │ │ └── default.js
│ │ │ ├── stdafx.cpp
│ │ │ └── stdafx.h
│ │ ├── FacebookDemo/
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cpp
│ │ │ ├── App.xaml.h
│ │ │ ├── Common/
│ │ │ │ └── StandardStyles.xaml
│ │ │ ├── Facebook.cpp
│ │ │ ├── Facebook.h
│ │ │ ├── MainPage.xaml
│ │ │ ├── MainPage.xaml.cpp
│ │ │ ├── MainPage.xaml.h
│ │ │ ├── Package.appxmanifest
│ │ │ ├── Package.uwp.appxmanifest
│ │ │ ├── pch.cpp
│ │ │ └── pch.h
│ │ ├── OAuth2Live/
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cpp
│ │ │ ├── App.xaml.h
│ │ │ ├── Common/
│ │ │ │ └── StandardStyles.xaml
│ │ │ ├── MainPage.xaml
│ │ │ ├── MainPage.xaml.cpp
│ │ │ ├── MainPage.xaml.h
│ │ │ ├── Package.appxmanifest
│ │ │ ├── Package.uwp.appxmanifest
│ │ │ ├── pch.cpp
│ │ │ └── pch.h
│ │ ├── Oauth1Client/
│ │ │ ├── CMakeLists.txt
│ │ │ └── Oauth1Client.cpp
│ │ ├── Oauth2Client/
│ │ │ ├── CMakeLists.txt
│ │ │ └── Oauth2Client.cpp
│ │ ├── SearchFile/
│ │ │ ├── CMakeLists.txt
│ │ │ └── searchfile.cpp
│ │ └── WindowsLiveAuth/
│ │ ├── App.xaml
│ │ ├── App.xaml.cpp
│ │ ├── App.xaml.h
│ │ ├── Common/
│ │ │ └── StandardStyles.xaml
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cpp
│ │ ├── MainPage.xaml.h
│ │ ├── Package.appxmanifest
│ │ ├── live_connect.h
│ │ ├── pch.cpp
│ │ └── pch.h
│ ├── src/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── http/
│ │ │ ├── client/
│ │ │ │ ├── http_client.cpp
│ │ │ │ ├── http_client_asio.cpp
│ │ │ │ ├── http_client_impl.h
│ │ │ │ ├── http_client_msg.cpp
│ │ │ │ ├── http_client_winhttp.cpp
│ │ │ │ ├── http_client_winrt.cpp
│ │ │ │ └── x509_cert_utilities.cpp
│ │ │ ├── common/
│ │ │ │ ├── connection_pool_helpers.h
│ │ │ │ ├── http_compression.cpp
│ │ │ │ ├── http_helpers.cpp
│ │ │ │ ├── http_msg.cpp
│ │ │ │ ├── internal_http_helpers.h
│ │ │ │ └── x509_cert_utilities.h
│ │ │ ├── listener/
│ │ │ │ ├── http_listener.cpp
│ │ │ │ ├── http_listener_msg.cpp
│ │ │ │ ├── http_server_api.cpp
│ │ │ │ ├── http_server_asio.cpp
│ │ │ │ ├── http_server_httpsys.cpp
│ │ │ │ ├── http_server_httpsys.h
│ │ │ │ └── http_server_impl.h
│ │ │ └── oauth/
│ │ │ ├── oauth1.cpp
│ │ │ └── oauth2.cpp
│ │ ├── json/
│ │ │ ├── json.cpp
│ │ │ ├── json_parsing.cpp
│ │ │ └── json_serialization.cpp
│ │ ├── pch/
│ │ │ ├── stdafx.cpp
│ │ │ └── stdafx.h
│ │ ├── pplx/
│ │ │ ├── pplx.cpp
│ │ │ ├── pplxapple.cpp
│ │ │ ├── pplxlinux.cpp
│ │ │ ├── pplxwin.cpp
│ │ │ └── threadpool.cpp
│ │ ├── streams/
│ │ │ ├── fileio_posix.cpp
│ │ │ ├── fileio_win32.cpp
│ │ │ └── fileio_winrt.cpp
│ │ ├── uri/
│ │ │ ├── uri.cpp
│ │ │ └── uri_builder.cpp
│ │ ├── utilities/
│ │ │ ├── asyncrt_utils.cpp
│ │ │ ├── base64.cpp
│ │ │ └── web_utilities.cpp
│ │ └── websockets/
│ │ └── client/
│ │ ├── ws_client.cpp
│ │ ├── ws_client_impl.h
│ │ ├── ws_client_winrt.cpp
│ │ ├── ws_client_wspp.cpp
│ │ └── ws_msg.cpp
│ └── tests/
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── common/
│ │ ├── CMakeLists.txt
│ │ ├── TestRunner/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── test_module_loader.cpp
│ │ │ ├── test_module_loader.h
│ │ │ └── test_runner.cpp
│ │ ├── UnitTestpp/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── COPYING
│ │ │ ├── ThirdPartyNotices.txt
│ │ │ ├── config.h
│ │ │ ├── src/
│ │ │ │ ├── AssertException.cpp
│ │ │ │ ├── AssertException.h
│ │ │ │ ├── CheckMacros.h
│ │ │ │ ├── Checks.h
│ │ │ │ ├── CompositeTestReporter.cpp
│ │ │ │ ├── CompositeTestReporter.h
│ │ │ │ ├── CurrentTest.cpp
│ │ │ │ ├── CurrentTest.h
│ │ │ │ ├── DeferredTestReporter.cpp
│ │ │ │ ├── DeferredTestReporter.h
│ │ │ │ ├── DeferredTestResult.cpp
│ │ │ │ ├── DeferredTestResult.h
│ │ │ │ ├── ExceptionMacros.h
│ │ │ │ ├── ExecuteTest.h
│ │ │ │ ├── GlobalSettings.cpp
│ │ │ │ ├── GlobalSettings.h
│ │ │ │ ├── HelperMacros.h
│ │ │ │ ├── MemoryOutStream.cpp
│ │ │ │ ├── MemoryOutStream.h
│ │ │ │ ├── Posix/
│ │ │ │ │ ├── SignalTranslator.cpp
│ │ │ │ │ ├── SignalTranslator.h
│ │ │ │ │ ├── TimeHelpers.cpp
│ │ │ │ │ └── TimeHelpers.h
│ │ │ │ ├── ReportAssert.cpp
│ │ │ │ ├── ReportAssert.h
│ │ │ │ ├── ReportAssertImpl.h
│ │ │ │ ├── Test.cpp
│ │ │ │ ├── Test.h
│ │ │ │ ├── TestDetails.cpp
│ │ │ │ ├── TestDetails.h
│ │ │ │ ├── TestList.cpp
│ │ │ │ ├── TestList.h
│ │ │ │ ├── TestMacros.h
│ │ │ │ ├── TestProperties.h
│ │ │ │ ├── TestReporter.cpp
│ │ │ │ ├── TestReporter.h
│ │ │ │ ├── TestReporterStdout.cpp
│ │ │ │ ├── TestReporterStdout.h
│ │ │ │ ├── TestResults.cpp
│ │ │ │ ├── TestResults.h
│ │ │ │ ├── TestRunner.cpp
│ │ │ │ ├── TestRunner.h
│ │ │ │ ├── TestSuite.h
│ │ │ │ ├── TimeHelpers.h
│ │ │ │ ├── Win32/
│ │ │ │ │ ├── TimeHelpers.cpp
│ │ │ │ │ └── TimeHelpers.h
│ │ │ │ ├── XmlTestReporter.cpp
│ │ │ │ ├── XmlTestReporter.h
│ │ │ │ ├── stdafx.cpp
│ │ │ │ ├── stdafx.h
│ │ │ │ └── tests/
│ │ │ │ ├── RecordingReporter.h
│ │ │ │ ├── ScopedCurrentTest.h
│ │ │ │ ├── TestAssertHandler.cpp
│ │ │ │ ├── TestCheckMacros.cpp
│ │ │ │ ├── TestChecks.cpp
│ │ │ │ ├── TestCompositeTestReporter.cpp
│ │ │ │ ├── TestCurrentTest.cpp
│ │ │ │ ├── TestDeferredTestReporter.cpp
│ │ │ │ ├── TestMemoryOutStream.cpp
│ │ │ │ ├── TestTest.cpp
│ │ │ │ ├── TestTestList.cpp
│ │ │ │ ├── TestTestMacros.cpp
│ │ │ │ ├── TestTestResults.cpp
│ │ │ │ ├── TestTestRunner.cpp
│ │ │ │ ├── TestTestSuite.cpp
│ │ │ │ ├── TestUnitTestPP.cpp
│ │ │ │ ├── TestXmlTestReporter.cpp
│ │ │ │ ├── stdafx.cpp
│ │ │ │ └── stdafx.h
│ │ │ └── unittestpp.h
│ │ └── utilities/
│ │ ├── CMakeLists.txt
│ │ ├── include/
│ │ │ ├── common_utilities_public.h
│ │ │ ├── locale_guard.h
│ │ │ └── os_utilities.h
│ │ └── os_utilities.cpp
│ └── functional/
│ ├── CMakeLists.txt
│ ├── http/
│ │ ├── CMakeLists.txt
│ │ ├── client/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── authentication_tests.cpp
│ │ │ ├── building_request_tests.cpp
│ │ │ ├── client_construction.cpp
│ │ │ ├── compression_tests.cpp
│ │ │ ├── connection_pool_tests.cpp
│ │ │ ├── connections_and_errors.cpp
│ │ │ ├── header_tests.cpp
│ │ │ ├── http_client_fuzz_tests.cpp
│ │ │ ├── http_client_tests.cpp
│ │ │ ├── http_client_tests.h
│ │ │ ├── http_methods_tests.cpp
│ │ │ ├── multiple_requests.cpp
│ │ │ ├── oauth1_tests.cpp
│ │ │ ├── oauth2_tests.cpp
│ │ │ ├── outside_tests.cpp
│ │ │ ├── pipeline_stage_tests.cpp
│ │ │ ├── progress_handler_tests.cpp
│ │ │ ├── proxy_tests.cpp
│ │ │ ├── redirect_tests.cpp
│ │ │ ├── request_helper_tests.cpp
│ │ │ ├── request_stream_tests.cpp
│ │ │ ├── request_uri_tests.cpp
│ │ │ ├── response_extract_tests.cpp
│ │ │ ├── response_stream_tests.cpp
│ │ │ ├── status_code_reason_phrase_tests.cpp
│ │ │ ├── stdafx.cpp
│ │ │ ├── stdafx.h
│ │ │ ├── timeout_handler.h
│ │ │ └── to_string_tests.cpp
│ │ ├── listener/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── building_response_tests.cpp
│ │ │ ├── connections_and_errors.cpp
│ │ │ ├── header_tests.cpp
│ │ │ ├── http_listener_tests.h
│ │ │ ├── listener_construction_tests.cpp
│ │ │ ├── reply_helper_tests.cpp
│ │ │ ├── request_extract_tests.cpp
│ │ │ ├── request_handler_tests.cpp
│ │ │ ├── request_relative_uri_tests.cpp
│ │ │ ├── request_stream_tests.cpp
│ │ │ ├── requests_tests.cpp
│ │ │ ├── response_stream_tests.cpp
│ │ │ ├── status_code_reason_phrase_tests.cpp
│ │ │ ├── stdafx.cpp
│ │ │ ├── stdafx.h
│ │ │ └── to_string_tests.cpp
│ │ └── utilities/
│ │ ├── CMakeLists.txt
│ │ ├── http_asserts.cpp
│ │ ├── include/
│ │ │ ├── http_asserts.h
│ │ │ ├── http_test_utilities.h
│ │ │ ├── http_test_utilities_public.h
│ │ │ ├── test_http_client.h
│ │ │ ├── test_http_server.h
│ │ │ └── test_server_utilities.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ ├── test_http_client.cpp
│ │ ├── test_http_server.cpp
│ │ └── test_server_utilities.cpp
│ ├── json/
│ │ ├── CMakeLists.txt
│ │ ├── construction_tests.cpp
│ │ ├── fuzz_tests.cpp
│ │ ├── iterator_tests.cpp
│ │ ├── json_numbers_tests.cpp
│ │ ├── negative_parsing_tests.cpp
│ │ ├── parsing_tests.cpp
│ │ └── to_as_and_operators_tests.cpp
│ ├── misc/
│ │ └── atl_headers/
│ │ ├── Resource.h
│ │ ├── header_test1.cpp
│ │ └── header_test2.cpp
│ ├── pplx/
│ │ ├── CMakeLists.txt
│ │ └── pplx_test/
│ │ ├── CMakeLists.txt
│ │ ├── pplx_op_test.cpp
│ │ ├── pplx_task_options.cpp
│ │ ├── pplxtask_tests.cpp
│ │ ├── stdafx.cpp
│ │ └── stdafx.h
│ ├── streams/
│ │ ├── CMakeLists.txt
│ │ ├── CppSparseFile.cpp
│ │ ├── CppSparseFile.h
│ │ ├── fstreambuf_tests.cpp
│ │ ├── fuzz_tests.cpp
│ │ ├── istream_tests.cpp
│ │ ├── memstream_tests.cpp
│ │ ├── ostream_tests.cpp
│ │ ├── prefix.h
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ ├── stdstream_tests.cpp
│ │ ├── streams_tests.h
│ │ └── winrt_interop_tests.cpp
│ ├── uri/
│ │ ├── CMakeLists.txt
│ │ ├── accessor_tests.cpp
│ │ ├── combining_tests.cpp
│ │ ├── constructor_tests.cpp
│ │ ├── conversions_tests.cpp
│ │ ├── diagnostic_tests.cpp
│ │ ├── encoding_tests.cpp
│ │ ├── operator_tests.cpp
│ │ ├── resolve_uri_tests.cpp
│ │ ├── splitting_tests.cpp
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ ├── uri_builder_tests.cpp
│ │ └── uri_tests.h
│ ├── utils/
│ │ ├── CMakeLists.txt
│ │ ├── base64.cpp
│ │ ├── datetime.cpp
│ │ ├── macro_test.cpp
│ │ ├── nonce_generator_tests.cpp
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ ├── strings.cpp
│ │ ├── utils_tests.h
│ │ └── win32_encryption_tests.cpp
│ └── websockets/
│ ├── CMakeLists.txt
│ ├── client/
│ │ ├── authentication_tests.cpp
│ │ ├── client_construction.cpp
│ │ ├── close_tests.cpp
│ │ ├── error_tests.cpp
│ │ ├── proxy_tests.cpp
│ │ ├── receive_msg_tests.cpp
│ │ ├── send_msg_tests.cpp
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── websocket_client_tests.h
│ └── utilities/
│ ├── stdafx.cpp
│ ├── stdafx.h
│ ├── test_websocket_server.cpp
│ └── test_websocket_server.h
├── SECURITY.md
├── ThirdPartyNotices.txt
├── azure-devops/
│ ├── build-ubuntu-apt.yml
│ ├── build-ubuntu-vcpkg.yml
│ ├── build-windows.yml
│ └── vcpkg-windows.txt
├── azure-pipelines.yml
├── changelog.md
└── license.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
# https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormatStyleOptions.html
---
Language: Cpp
BasedOnStyle: WebKit
AlignAfterOpenBracket: Align
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
FixNamespaceComments: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^["<](stdafx|pch)\.h[">]$'
Priority: -1
- Regex: '^<Windows\.h>$'
Priority: 3
- Regex: '^<(WinIoCtl|winhttp|Shellapi)\.h>$'
Priority: 4
- Regex: '.*'
Priority: 2
IndentCaseLabels: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
PenaltyReturnTypeOnItsOwnLine: 1000
PointerAlignment: Left
SpaceAfterTemplateKeyword: false
Standard: Cpp11
UseTab: Never
================================================
FILE: .gitignore
================================================
# Visual Studio files
*.o
*.d
*.so
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.sdf
*.opensdf
*.pdb
*.idb
*.res
*.unsuccessfulbuild
*.lastbuildstate
*.tlog
*.intermediate
*.dll
*.exp
*.exe
*.manifest
*.rc
*~
ipch/
obj/
# OSX files
*.xccheckout
*.pbxuser
*.mode1v3
*.mode2v3
*.perspective3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspective3
xcuserdata
*.xcuserstate
.DS_Store
.Trashes
*.swp
*.lock
*~.nib
*.resfiles
[Bb]in
Binaries/
Intermediate/
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
.vs/
# Ignore cmake building directories
build.*/
docs/
# Ignore NuGet artifacts
.nuget/
Build_android/build/
Generated Files/
# Ignore iOS temp build directories
Build_iOS/Apple-Boost-BuildScript
/out/
================================================
FILE: .gitmodules
================================================
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/Microsoft/vcpkg
[submodule "websocketpp"]
path = Release/libs/websocketpp
url = https://github.com/zaphoyd/websocketpp
fetchRecurseSubmodules = false
================================================
FILE: .vscode/launch.json
================================================
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch Debug Tests",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build.debug/Release/Binaries/test_runner.exe",
"args": ["*testd.dll"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build.debug/Release/Binaries",
"environment": [],
"externalConsole": true
}
]
}
================================================
FILE: .vscode/settings.json
================================================
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/vcpkg/**": true,
"build.x86.debug": true,
"build.x86.release": true,
"build.x64.debug": true,
"build.x64.release": true,
"out": true,
},
"cSpell.words": [
"XPLATSTR",
"blittable",
"pplx",
"rdpos",
"rgpsz"
]
}
================================================
FILE: Build_android/configure.sh
================================================
#!/bin/bash
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
# =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
#
# configure.sh
#
# Build script for casablanca on android
#
# For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
#
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
set -e
# The Android NDK r10e or later may work, but we test with r18b. To download, see the following link:
# https://developer.android.com/ndk/downloads/index.html
# -----------------
# Parse args
# -----------------
DO_BOOST=1
DO_OPENSSL=1
DO_CMAKE=1
DO_CPPRESTSDK=1
BOOSTVER=1.70.0
OPENSSLVER=1.1.0j
CMAKEVER=3.14.0
API=15
STL=c++_shared
function usage {
echo "Usage: $0 [--skip-boost] [--skip-openssl] [--skip-cpprestsdk] [-h] [--ndk <android-ndk>]"
echo ""
echo " --skip-boost Skip fetching and compiling boost"
echo " --skip-openssl Skip fetching and compiling openssl"
echo " --skip-cpprestsdk Skip compiling cpprestsdk"
echo " --boost <version> Override the Boost version to build (default is ${BOOSTVER})"
echo " --openssl <version> Override the OpenSSL version to build (default is ${OPENSSLVER})"
echo " --ndk <android-ndk> If specified, overrides the ANDROID_NDK environment variable"
echo " -h,--help,-? Display this information"
}
while [[ $# > 0 ]]
do
case $1 in
"--skip-boost")
DO_BOOST=0
;;
"--skip-openssl")
DO_OPENSSL=0
;;
"--skip-cmake")
DO_CMAKE=0
;;
"--skip-cpprestsdk")
DO_CPPRESTSDK=0
;;
"--boost")
shift
DO_BOOST=1
BOOSTVER=$1
;;
"--cmake")
shift
DO_CMAKE=1
CMAKEVER=$1
;;
"--openssl")
shift
DO_OPENSSL=1
OPENSSLVER=$1
;;
"--ndk")
shift
export ANDROID_NDK=$1
;;
"-?"|"-h"|"--help")
usage
exit
;;
*)
usage
exit 1
;;
esac
shift
done
# Variables setup
unset BOOST_ROOT
if [ ! -e "${ANDROID_NDK}/ndk-build" ]
then
echo "ANDROID_NDK does not point to a valid NDK."
echo "(current setting: '${ANDROID_NDK}')"
exit 1
fi
NDK_DIR=`cd "${ANDROID_NDK}" && pwd`
SRC_DIR=`pwd`
if [ -z "$NCPU" ]; then
NCPU=4
if uname -s | grep -i "linux" > /dev/null ; then
NCPU=`cat /proc/cpuinfo | grep -c -i processor`
fi
fi
# -----------------------
# Identify the script dir
# -----------------------
# source:
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ "$SRC_DIR" == "$DIR" ]
then
echo "You must use a separate directory for building."
echo "(try 'mkdir build; cd build; ../configure.sh')"
exit 1
fi
# -------
# Openssl
# -------
# This steps are based on the official openssl build instructions
# http://wiki.openssl.org/index.php/Android
if [ "${DO_OPENSSL}" == "1" ]; then (
if [ ! -d "openssl" ]; then mkdir openssl; fi
cd openssl
cp -af "${DIR}/openssl/." .
make all ANDROID_NDK="${NDK_DIR}" ANDROID_TOOLCHAIN=clang ANDROID_ABI=armeabi-v7a OPENSSL_PREFIX=armeabi-v7a OPENSSL_VERSION=$OPENSSLVER -j $NCPU
make all ANDROID_NDK="${NDK_DIR}" ANDROID_TOOLCHAIN=clang ANDROID_ABI=x86 OPENSSL_PREFIX=x86 OPENSSL_VERSION=$OPENSSLVER -j $NCPU
) fi
# -----
# Boost
# -----
# Uses the build script from Moritz Wundke (formerly MysticTreeGames)
# https://github.com/moritz-wundke/Boost-for-Android
# (plus the patch https://github.com/o01eg/Boost-for-Android/tree/ndk-bump-21)
if [ "${DO_BOOST}" == "1" ]; then (
if [ ! -d 'Boost-for-Android' ]; then git clone https://github.com/o01eg/Boost-for-Android/; fi
cd Boost-for-Android
git checkout 7626dd6f7cab7866dce20e685d4a1b11194366a7
PATH="$PATH:$NDK_DIR" \
CXXFLAGS="-std=gnu++11" \
./build-android.sh \
--boost=$BOOSTVER \
--arch=armeabi-v7a,x86 \
--with-libraries=atomic,random,date_time,filesystem,system,thread,chrono \
"${NDK_DIR}" || exit 1
) fi
# ------
# CMake
# ------
# We update CMake because the version included with Ubuntu is too old to handle Boost 1.69.
if [ "${DO_CMAKE}" == "1" ]; then (
if [ ! -d "cmake-${CMAKEVER}" ]; then wget https://github.com/Kitware/CMake/releases/download/v${CMAKEVER}/cmake-${CMAKEVER}-Linux-x86_64.sh; fi
chmod +x cmake-${CMAKEVER}-Linux-x86_64.sh
rm -rf cmake-${CMAKEVER}
mkdir cmake-${CMAKEVER}
cd cmake-${CMAKEVER}
../cmake-${CMAKEVER}-Linux-x86_64.sh --skip-license
) fi
# ----------
# casablanca
# ----------
if [ "${DO_CPPRESTSDK}" == "1" ]; then
# Use the builtin CMake toolchain configuration that comes with the NDK
function build_cpprestsdk { (
rm -rf $1
./cmake-${CMAKEVER}/bin/cmake \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" \
-DANDROID_NDK="${ANDROID_NDK}" \
-DANDROID_TOOLCHAIN=clang \
-DANDROID_ABI=$2 \
-DBOOST_VERSION="${BOOSTVER}" \
-DCPPREST_EXCLUDE_WEBSOCKETS=ON \
-DCMAKE_BUILD_TYPE=$3 \
-S "${DIR}/.." \
-B $1
make -j $NCPU -C $1
) }
# Build the cpprestsdk for each target configuration
build_cpprestsdk build.armv7.debug armeabi-v7a Debug
build_cpprestsdk build.armv7.release armeabi-v7a Release
build_cpprestsdk build.x86.debug x86 Debug
build_cpprestsdk build.x86.release x86 Release
fi
================================================
FILE: Build_android/openssl/Makefile
================================================
# Configuration parameters
ANDROID_API = 18
ANDROID_ABI = armeabi-v7a
ANDROID_HOST = linux-x86_64
ANDROID_TOOLCHAIN = gcc
ANDROID_GCC_VERSION = 4.8
OPENSSL_VERSION = 1.0.2k
OPENSSL_PACKAGE = openssl-$(OPENSSL_VERSION)
OPENSSL_PATCH = $(OPENSSL_PACKAGE).patch
OPENSSL_TARBALL = $(OPENSSL_PACKAGE).tar.gz
OPENSSL_URL = https://www.openssl.org/source/$(OPENSSL_TARBALL)
OPENSSL_OPTIONS = -no-ssl2 -no-ssl3 -no-comp -no-hw -no-engine
OPENSSL_PREFIX = android-$(ANDROID_API)-$(ANDROID_ABI)-$(ANDROID_TOOLCHAIN)
OPENSSL_SOURCE = $(OPENSSL_PACKAGE)-$(ANDROID_ABI)
# Setup target parameters from ABI
ifneq ($(findstring armeabi,$(ANDROID_ABI)),)
ANDROID_ARCH := arm
ANDROID_TRIPLE := arm-linux-androideabi
ANDROID_TOOLARCH := $(ANDROID_TRIPLE)
OPENSSL_MACHINE := armv7
OPENSSL_SYSTEM := android
OPENSSL_TARGET := android-armeabi
endif
ifneq ($(findstring aarch64,$(ANDROID_ABI)),)
ANDROID_ARCH := arm64
ANDROID_TRIPLE := aarch64-linux-android
ANDROID_TOOLARCH := $(ANDROID_TRIPLE)
OPENSSL_MACHINE := aarch64
OPENSSL_SYSTEM := android64
OPENSSL_TARGET := android64-aarch64
endif
ifneq ($(findstring x86,$(ANDROID_ABI)),)
ANDROID_ARCH := x86
ANDROID_TRIPLE := i686-linux-android
ANDROID_TOOLARCH := $(ANDROID_ARCH)
OPENSSL_MACHINE := i686
OPENSSL_SYSTEM := android
OPENSSL_TARGET := android-x86
endif
# Validate Android NDK directory paths and use fallback directories where applicable
define direxists =
$(if $(wildcard $(1)),$(strip $(1)),"")
endef
define findfirstdir =
$(call direxists,$(firstword $(filter-out "",$(foreach val,$(3),$(call direxists,$(subst $(2),$(strip $(val)),$(1)))))))
endef
ifeq ($(call direxists,$(ANDROID_NDK)),"")
$(error invalid Android NDK root directory)
endif
ANDROID_LINK_SYSROOT := $(ANDROID_NDK)/platforms/android-$(ANDROID_API)/arch-$(ANDROID_ARCH)
ifeq ($(call direxists,$(ANDROID_LINK_SYSROOT)),"")
$(error invalid Android ABI or API level, could not locate Android NDK sysroot directory)
endif
ANDROID_SYSROOT := $(ANDROID_NDK)/sysroot
ifeq ($(call direxists,$(ANDROID_SYSROOT)),"")
ANDROID_SYSROOT := $(ANDROID_LINK_SYSROOT)
endif
ANDROID_GCC_VERSIONS := $(ANDROID_GCC_VERSION) 4.9 4.8
ANDROID_GCC_PREBUILT_template := $(ANDROID_NDK)/toolchains/$(ANDROID_TOOLARCH)-<<VERSION>>/prebuilt
ANDROID_GCC_PREBUILT := $(call findfirstdir,$(ANDROID_GCC_PREBUILT_template),<<VERSION>>,$(ANDROID_GCC_VERSIONS))
ifeq ($(ANDROID_GCC_PREBUILT),"")
$(error could not determine Android NDK GCC toolchain prebuilt directory)
endif
ANDROID_HOSTS := $(ANDROID_HOST) linux-x86_64 linux-x86 darwin-x86_64 darwin-x86
ANDROID_GCC_TOOLCHAIN_template := $(ANDROID_GCC_PREBUILT)/<<HOST>>
ANDROID_GCC_TOOLCHAIN := $(call findfirstdir,$(ANDROID_GCC_TOOLCHAIN_template),<<HOST>>,$(ANDROID_HOSTS))
ifeq ($(ANDROID_GCC_TOOLCHAIN),"")
$(error could not determine Android NDK GCC toolchain host directory)
endif
ANDROID_LLVM_VERSIONS := llvm llvm-3.6 llvm-3.5 llvm-3.4
ANDROID_LLVM_TOOLCHAIN_template := $(ANDROID_NDK)/toolchains/<<LLVM>>/prebuilt/$(notdir $(ANDROID_GCC_TOOLCHAIN))
ANDROID_LLVM_TOOLCHAIN := $(call findfirstdir,$(ANDROID_LLVM_TOOLCHAIN_template),<<LLVM>>,$(ANDROID_LLVM_VERSIONS))
ifeq ($(ANDROID_LLVM_TOOLCHAIN),"")
$(error could not determine Android NDK LLVM toolchain directory)
endif
# Configure toolchain
OPENSSL_CROSS_COMPILE :=
OPENSSL_CC :=
OPENSSL_RANLIB := $(ANDROID_GCC_TOOLCHAIN)/bin/$(ANDROID_TRIPLE)-ranlib
ifneq ($(findstring clang,$(ANDROID_TOOLCHAIN)),)
OPENSSL_TARGET := $(OPENSSL_TARGET)-clang
OPENSSL_CC := $(ANDROID_LLVM_TOOLCHAIN)/bin/clang
endif
ifneq ($(findstring gcc,$(ANDROID_TOOLCHAIN)),)
OPENSSL_CROSS_COMPILE := $(ANDROID_TRIPLE)-
OPENSSL_CC := $(ANDROID_GCC_TOOLCHAIN)/bin/$(ANDROID_TRIPLE)-gcc
endif
ifeq ($(OPENSSL_CC),)
$(error invalid toolchain specified for ANDROID_TOOLCHAIN)
endif
all: info $(OPENSSL_PREFIX)/lib/libssl.a
$(OPENSSL_TARBALL):
@echo "Downloading OpenSSL tarball"
wget $(OPENSSL_URL)
$(OPENSSL_PREFIX)/lib/libssl.a: $(OPENSSL_TARBALL)
@echo "Decompressing OpenSSL package" && \
( \
set -e; \
rm -rf $(OPENSSL_SOURCE); \
rm -rf $(OPENSSL_PACKAGE); \
tar xzf $(OPENSSL_TARBALL); \
) && \
mv $(OPENSSL_PACKAGE) $(OPENSSL_SOURCE)
@if test -f $(OPENSSL_PATCH); then \
echo "Patching OpenSSL source tree"; \
( cd $(OPENSSL_SOURCE) && patch -p1 < ../$(OPENSSL_PATCH) ); \
fi
@echo "Building OpenSSL" && \
export ANDROID_NDK="$(ANDROID_NDK)" && \
export ANDROID_API="$(ANDROID_API)" && \
export ANDROID_ARCH="$(ANDROID_ARCH)" && \
export ANDROID_TRIPLE="$(ANDROID_TRIPLE)" && \
export ANDROID_SYSROOT="$(ANDROID_SYSROOT)" && \
export ANDROID_LINK_SYSROOT="$(ANDROID_LINK_SYSROOT)" && \
export ANDROID_GCC_TOOLCHAIN="$(ANDROID_GCC_TOOLCHAIN)" && \
export CROSS_SYSROOT="$(ANDROID_SYSROOT)" && \
export SYSROOT="$(ANDROID_SYSROOT)" && \
export ARCH="$(ANDROID_ARCH)" && \
export MACHINE="$(OPENSSL_MACHINE)" && \
export SYSTEM="$(OPENSSL_SYSTEM)" && \
export CROSS_COMPILE="$(OPENSSL_CROSS_COMPILE)" && \
export HOSTCC="$(ANDROID_TOOLCHAIN)" && \
export PATH="$(ANDROID_GCC_TOOLCHAIN)/bin:$(ANDROID_LLVM_TOOLCHAIN)/bin:$(PATH)" && \
( \
cd $(OPENSSL_SOURCE); \
perl Configure $(OPENSSL_TARGET) shared $(OPENSSL_OPTIONS) --prefix="`pwd`/../$(OPENSSL_PREFIX)" $(OPENSSL_CFLAGS) && \
make depend && \
make all && \
make install CC=$(OPENSSL_CC) RANLIB=$(OPENSSL_RANLIB); \
)
clean:
@echo "Cleaning"
rm -rf $(OPENSSL_SOURCE)
rm -rf $(OPENSSL_PACKAGE)
rm -rf $(OPENSSL_PREFIX)
info:
@echo "OpenSSL build options"
@echo "ANDROID_NDK = $(ANDROID_NDK)"
@echo "ANDROID_API = $(ANDROID_API)"
@echo "ANDROID_ABI = $(ANDROID_ABI)"
@echo "ANDROID_HOST = $(ANDROID_HOST)"
@echo "ANDROID_TOOLCHAIN = $(ANDROID_TOOLCHAIN)"
@echo "ANDROID_TRIPLE = $(ANDROID_TRIPLE)"
@echo "ANDROID_SYSROOT = $(ANDROID_SYSROOT)"
@echo "ANDROID_LINK_SYSROOT = $(ANDROID_LINK_SYSROOT)"
@echo "ANDROID_GCC_TOOLCHAIN = $(ANDROID_GCC_TOOLCHAIN)"
@echo "ANDROID_LLVM_TOOLCHAIN = $(ANDROID_LLVM_TOOLCHAIN)"
@echo "OPENSSL_VERSION = $(OPENSSL_VERSION)"
@echo "OPENSSL_URL = $(OPENSSL_URL)"
@echo "OPENSSL_OPTIONS = $(OPENSSL_OPTIONS)"
@echo "OPENSSL_PREFIX = $(OPENSSL_PREFIX)"
@echo "OPENSSL_CFLAGS = $(OPENSSL_CFLAGS)"
@echo "OPENSSL_CC = $(OPENSSL_CC)"
@echo "OPENSSL_RANLIB = $(OPENSSL_RANLIB)"
.PHONY: all clean info
================================================
FILE: Build_android/openssl/openssl-1.0.2k.patch
================================================
This patch applies several changes that enable OpenSSL 1.0.2k to be built
for Android using either Clang or GCC toolchains.
An alias for the android-armv7 target, named android-armeabi, is added for
compatability with the OpenSSL 1.1.0 configuration target names. Support for
the AArch64 archicture is also added, as well as targets using the Clang
compiler.
Clang does not recognize some of the ARM assembly nmenonics that are used in
OpenSSL. In particular, the 'adrl' pseudo instruction is not supported. To
further complicate matters, Clang doesn't support immediate fixup values so
the alternative adr/sub sequence used for the Thumb2 code path cannot be
used either. Instead it is replaced with a sequence of instructions that
computes the offset at runtime. It utilizes register r4 for computing the
intermediate result, which is first saved to and later restored from the
stack. The upstream bug in LLVM can be found here:
https://llvm.org/bugs/show_bug.cgi?id=24350
diff -Naur org/Configure mod/Configure
--- org/Configure 2017-01-26 05:22:03.000000000 -0800
+++ mod/Configure 2018-01-17 14:25:44.712943600 -0800
@@ -471,10 +471,17 @@
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
# Android: linux-* but without pointers to headers and libs.
-"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64","gcc:-march=armv8-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86-clang","clang:-target i686-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64-clang","clang:-target aarch64-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips-clang","clang:-target mipsel-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
#### *BSD [do see comment about ${BSDthreads} above!]
"BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff -Naur org/crypto/bn/asm/armv4-gf2m.pl mod/crypto/bn/asm/armv4-gf2m.pl
--- org/crypto/bn/asm/armv4-gf2m.pl 2017-01-26 05:22:03.000000000 -0800
+++ mod/crypto/bn/asm/armv4-gf2m.pl 2018-01-17 11:38:57.297482700 -0800
@@ -213,8 +213,8 @@
.align 5
.LNEON:
ldr r12, [sp] @ 5th argument
- vmov.32 $a, r2, r1
- vmov.32 $b, r12, r3
+ vmov $a, r2, r1
+ vmov $b, r12, r3
vmov.i64 $k48, #0x0000ffffffffffff
vmov.i64 $k32, #0x00000000ffffffff
vmov.i64 $k16, #0x000000000000ffff
diff -Naur org/crypto/sha/asm/sha256-armv4.pl mod/crypto/sha/asm/sha256-armv4.pl
--- org/crypto/sha/asm/sha256-armv4.pl 2017-01-26 05:22:03.000000000 -0800
+++ mod/crypto/sha/asm/sha256-armv4.pl 2018-01-17 11:38:57.306342000 -0800
@@ -576,6 +576,7 @@
my @MSG=map("q$_",(8..11));
my ($W0,$W1,$ABCD_SAVE,$EFGH_SAVE)=map("q$_",(12..15));
my $Ktbl="r3";
+my $Temp="r4";
$code.=<<___;
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
@@ -591,7 +592,13 @@
sha256_block_data_order_armv8:
.LARMv8:
vld1.32 {$ABCD,$EFGH},[$ctx]
-# ifdef __thumb2__
+# if defined(__clang__)
+ stmdb sp!,{r4,lr}
+ adr $Ktbl,.LARMv8
+ ldr $Temp,=K256
+ sub $Temp,$Ktbl,$Temp
+ sub $Ktbl,$Ktbl,$Temp
+# elif defined(__thumb2__)
adr $Ktbl,.LARMv8
sub $Ktbl,$Ktbl,#.LARMv8-K256
# else
@@ -655,7 +662,12 @@
vst1.32 {$ABCD,$EFGH},[$ctx]
+# ifdef __clang__
+ ldmia sp!,{r4,pc}
+# else
ret @ bx lr
+# endif
+
.size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
#endif
___
diff -Naur org/Makefile.org mod/Makefile.org
--- org/Makefile.org 2017-01-26 05:22:03.000000000 -0800
+++ mod/Makefile.org 2018-01-17 14:26:20.623418300 -0800
@@ -532,7 +532,7 @@
@$(MAKE) SDIRS='$(SDIRS)' clean
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
-install: all install_docs install_sw
+install: install_docs install_sw
install_sw:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
================================================
FILE: Build_android/openssl/openssl-1.0.2l.patch
================================================
This patch applies several changes that enable OpenSSL 1.0.2l to be built
for Android using either Clang or GCC toolchains.
An alias for the android-armv7 target, named android-armeabi, is added for
compatability with the OpenSSL 1.1.0 configuration target names. Support for
the AArch64 archicture is also added, as well as targets using the Clang
compiler.
Clang does not recognize some of the ARM assembly nmenonics that are used in
OpenSSL. In particular, the 'adrl' pseudo instruction is not supported. To
further complicate matters, Clang doesn't support immediate fixup values so
the alternative adr/sub sequence used for the Thumb2 code path cannot be
used either. Instead it is replaced with a sequence of instructions that
computes the offset at runtime. It utilizes register r4 for computing the
intermediate result, which is first saved to and later restored from the
stack. The upstream bug in LLVM can be found here:
https://llvm.org/bugs/show_bug.cgi?id=24350
diff -Naur org/Configure mod/Configure
--- org/Configure 2017-05-25 05:54:38.000000000 -0700
+++ mod/Configure 2018-01-17 20:36:12.497485400 -0800
@@ -471,10 +471,17 @@
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
# Android: linux-* but without pointers to headers and libs.
-"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64","gcc:-march=armv8-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86-clang","clang:-target i686-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64-clang","clang:-target aarch64-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips-clang","clang:-target mipsel-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
#### *BSD [do see comment about ${BSDthreads} above!]
"BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff -Naur org/crypto/bn/asm/armv4-gf2m.pl mod/crypto/bn/asm/armv4-gf2m.pl
--- org/crypto/bn/asm/armv4-gf2m.pl 2017-05-25 05:54:34.000000000 -0700
+++ mod/crypto/bn/asm/armv4-gf2m.pl 2018-01-17 20:36:12.508421200 -0800
@@ -213,8 +213,8 @@
.align 5
.LNEON:
ldr r12, [sp] @ 5th argument
- vmov.32 $a, r2, r1
- vmov.32 $b, r12, r3
+ vmov $a, r2, r1
+ vmov $b, r12, r3
vmov.i64 $k48, #0x0000ffffffffffff
vmov.i64 $k32, #0x00000000ffffffff
vmov.i64 $k16, #0x000000000000ffff
diff -Naur org/crypto/sha/asm/sha256-armv4.pl mod/crypto/sha/asm/sha256-armv4.pl
--- org/crypto/sha/asm/sha256-armv4.pl 2017-05-25 05:54:34.000000000 -0700
+++ mod/crypto/sha/asm/sha256-armv4.pl 2018-01-17 20:36:12.518242800 -0800
@@ -576,6 +576,7 @@
my @MSG=map("q$_",(8..11));
my ($W0,$W1,$ABCD_SAVE,$EFGH_SAVE)=map("q$_",(12..15));
my $Ktbl="r3";
+my $Temp="r4";
$code.=<<___;
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
@@ -591,7 +592,13 @@
sha256_block_data_order_armv8:
.LARMv8:
vld1.32 {$ABCD,$EFGH},[$ctx]
-# ifdef __thumb2__
+# if defined(__clang__)
+ stmdb sp!,{r4,lr}
+ adr $Ktbl,.LARMv8
+ ldr $Temp,=K256
+ sub $Temp,$Ktbl,$Temp
+ sub $Ktbl,$Ktbl,$Temp
+# elif defined(__thumb2__)
adr $Ktbl,.LARMv8
sub $Ktbl,$Ktbl,#.LARMv8-K256
# else
@@ -655,7 +662,12 @@
vst1.32 {$ABCD,$EFGH},[$ctx]
+# ifdef __clang__
+ ldmia sp!,{r4,pc}
+# else
ret @ bx lr
+# endif
+
.size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
#endif
___
diff -Naur org/Makefile.org mod/Makefile.org
--- org/Makefile.org 2017-05-25 05:54:38.000000000 -0700
+++ mod/Makefile.org 2018-01-17 20:36:12.532553700 -0800
@@ -540,7 +540,7 @@
@$(MAKE) SDIRS='$(SDIRS)' clean
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
-install: all install_docs install_sw
+install: install_docs install_sw
install_sw:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
================================================
FILE: Build_android/openssl/openssl-1.0.2m.patch
================================================
This patch applies several changes that enable OpenSSL 1.0.2m to be built
for Android using either Clang or GCC toolchains.
An alias for the android-armv7 target, named android-armeabi, is added for
compatability with the OpenSSL 1.1.0 configuration target names. Support for
the AArch64 archicture is also added, as well as targets using the Clang
compiler.
Clang does not recognize some of the ARM assembly nmenonics that are used in
OpenSSL. In particular, the 'adrl' pseudo instruction is not supported. To
further complicate matters, Clang doesn't support immediate fixup values so
the alternative adr/sub sequence used for the Thumb2 code path cannot be
used either. Instead it is replaced with a sequence of instructions that
computes the offset at runtime. It utilizes register r4 for computing the
intermediate result, which is first saved to and later restored from the
stack. The upstream bug in LLVM can be found here:
https://llvm.org/bugs/show_bug.cgi?id=24350
diff -Naur org/Configure mod/Configure
--- org/Configure 2017-11-02 07:32:57.000000000 -0700
+++ mod/Configure 2018-01-17 20:39:03.152448900 -0800
@@ -471,10 +471,17 @@
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
# Android: linux-* but without pointers to headers and libs.
-"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64","gcc:-march=armv8-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86-clang","clang:-target i686-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64-clang","clang:-target aarch64-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips-clang","clang:-target mipsel-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
#### *BSD [do see comment about ${BSDthreads} above!]
"BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff -Naur org/crypto/bn/asm/armv4-gf2m.pl mod/crypto/bn/asm/armv4-gf2m.pl
--- org/crypto/bn/asm/armv4-gf2m.pl 2017-11-02 07:32:57.000000000 -0700
+++ mod/crypto/bn/asm/armv4-gf2m.pl 2018-01-17 20:39:03.163187500 -0800
@@ -213,8 +213,8 @@
.align 5
.LNEON:
ldr r12, [sp] @ 5th argument
- vmov.32 $a, r2, r1
- vmov.32 $b, r12, r3
+ vmov $a, r2, r1
+ vmov $b, r12, r3
vmov.i64 $k48, #0x0000ffffffffffff
vmov.i64 $k32, #0x00000000ffffffff
vmov.i64 $k16, #0x000000000000ffff
diff -Naur org/crypto/sha/asm/sha256-armv4.pl mod/crypto/sha/asm/sha256-armv4.pl
--- org/crypto/sha/asm/sha256-armv4.pl 2017-11-02 07:32:58.000000000 -0700
+++ mod/crypto/sha/asm/sha256-armv4.pl 2018-01-17 20:39:03.173547800 -0800
@@ -576,6 +576,7 @@
my @MSG=map("q$_",(8..11));
my ($W0,$W1,$ABCD_SAVE,$EFGH_SAVE)=map("q$_",(12..15));
my $Ktbl="r3";
+my $Temp="r4";
$code.=<<___;
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
@@ -591,7 +592,13 @@
sha256_block_data_order_armv8:
.LARMv8:
vld1.32 {$ABCD,$EFGH},[$ctx]
-# ifdef __thumb2__
+# if defined(__clang__)
+ stmdb sp!,{r4,lr}
+ adr $Ktbl,.LARMv8
+ ldr $Temp,=K256
+ sub $Temp,$Ktbl,$Temp
+ sub $Ktbl,$Ktbl,$Temp
+# elif defined(__thumb2__)
adr $Ktbl,.LARMv8
sub $Ktbl,$Ktbl,#.LARMv8-K256
# else
@@ -655,7 +662,12 @@
vst1.32 {$ABCD,$EFGH},[$ctx]
+# ifdef __clang__
+ ldmia sp!,{r4,pc}
+# else
ret @ bx lr
+# endif
+
.size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
#endif
___
diff -Naur org/Makefile.org mod/Makefile.org
--- org/Makefile.org 2017-11-02 07:32:57.000000000 -0700
+++ mod/Makefile.org 2018-01-17 20:39:03.187911200 -0800
@@ -540,7 +540,7 @@
@$(MAKE) SDIRS='$(SDIRS)' clean
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
-install: all install_docs install_sw
+install: install_docs install_sw
install_sw:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
================================================
FILE: Build_android/openssl/openssl-1.0.2n.patch
================================================
This patch applies several changes that enable OpenSSL 1.0.2n to be built
for Android using either Clang or GCC toolchains.
An alias for the android-armv7 target, named android-armeabi, is added for
compatability with the OpenSSL 1.1.0 configuration target names. Support for
the AArch64 archicture is also added, as well as targets using the Clang
compiler.
Clang does not recognize some of the ARM assembly nmenonics that are used in
OpenSSL. In particular, the 'adrl' pseudo instruction is not supported. To
further complicate matters, Clang doesn't support immediate fixup values so
the alternative adr/sub sequence used for the Thumb2 code path cannot be
used either. Instead it is replaced with a sequence of instructions that
computes the offset at runtime. It utilizes register r4 for computing the
intermediate result, which is first saved to and later restored from the
stack. The upstream bug in LLVM can be found here:
https://llvm.org/bugs/show_bug.cgi?id=24350
diff -Naur org/Configure mod/Configure
--- org/Configure 2017-12-07 05:16:38.000000000 -0800
+++ mod/Configure 2018-01-17 20:41:03.880613500 -0800
@@ -471,10 +471,17 @@
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
# Android: linux-* but without pointers to headers and libs.
-"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi","gcc:-march=armv7-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64","gcc:-march=armv8-a -mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips","gcc:-mandroid --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-x86-clang","clang:-target i686-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armv7-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-armeabi-clang","clang:-target armv7-none-linux-androideabi --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android64-aarch64-clang","clang:-target aarch64-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"android-mips-clang","clang:-target mipsel-none-linux-android --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot \$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -B\$(ANDROID_LINK_SYSROOT)/lib -D__ANDROID_API__=\$(ANDROID_API) -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
#### *BSD [do see comment about ${BSDthreads} above!]
"BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff -Naur org/crypto/bn/asm/armv4-gf2m.pl mod/crypto/bn/asm/armv4-gf2m.pl
--- org/crypto/bn/asm/armv4-gf2m.pl 2017-12-07 05:16:38.000000000 -0800
+++ mod/crypto/bn/asm/armv4-gf2m.pl 2018-01-17 20:41:03.891956700 -0800
@@ -213,8 +213,8 @@
.align 5
.LNEON:
ldr r12, [sp] @ 5th argument
- vmov.32 $a, r2, r1
- vmov.32 $b, r12, r3
+ vmov $a, r2, r1
+ vmov $b, r12, r3
vmov.i64 $k48, #0x0000ffffffffffff
vmov.i64 $k32, #0x00000000ffffffff
vmov.i64 $k16, #0x000000000000ffff
diff -Naur org/crypto/sha/asm/sha256-armv4.pl mod/crypto/sha/asm/sha256-armv4.pl
--- org/crypto/sha/asm/sha256-armv4.pl 2017-12-07 05:16:38.000000000 -0800
+++ mod/crypto/sha/asm/sha256-armv4.pl 2018-01-17 20:41:03.901983600 -0800
@@ -576,6 +576,7 @@
my @MSG=map("q$_",(8..11));
my ($W0,$W1,$ABCD_SAVE,$EFGH_SAVE)=map("q$_",(12..15));
my $Ktbl="r3";
+my $Temp="r4";
$code.=<<___;
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
@@ -591,7 +592,13 @@
sha256_block_data_order_armv8:
.LARMv8:
vld1.32 {$ABCD,$EFGH},[$ctx]
-# ifdef __thumb2__
+# if defined(__clang__)
+ stmdb sp!,{r4,lr}
+ adr $Ktbl,.LARMv8
+ ldr $Temp,=K256
+ sub $Temp,$Ktbl,$Temp
+ sub $Ktbl,$Ktbl,$Temp
+# elif defined(__thumb2__)
adr $Ktbl,.LARMv8
sub $Ktbl,$Ktbl,#.LARMv8-K256
# else
@@ -655,7 +662,12 @@
vst1.32 {$ABCD,$EFGH},[$ctx]
+# ifdef __clang__
+ ldmia sp!,{r4,pc}
+# else
ret @ bx lr
+# endif
+
.size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
#endif
___
diff -Naur org/Makefile.org mod/Makefile.org
--- org/Makefile.org 2017-12-07 05:16:38.000000000 -0800
+++ mod/Makefile.org 2018-01-17 20:41:03.916748800 -0800
@@ -540,7 +540,7 @@
@$(MAKE) SDIRS='$(SDIRS)' clean
@$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' $(DISTTARVARS) tar
-install: all install_docs install_sw
+install: install_docs install_sw
install_sw:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
================================================
FILE: Build_android/openssl/openssl-1.1.0g.patch
================================================
This patch applies several changes that enable OpenSSL 1.1.0g to be built
for Android using either Clang or GCC toolchains.
diff -Naur org/Configurations/10-main.conf mod/Configurations/10-main.conf
--- org/Configurations/10-main.conf 2017-11-02 07:29:01.000000000 -0700
+++ mod/Configurations/10-main.conf 2018-01-18 10:59:41.675138500 -0800
@@ -910,15 +910,27 @@
# systems are perfectly capable of executing binaries targeting
# Froyo. Keep in mind that in the nutshell Android builds are
# about JNI, i.e. shared libraries, not applications.
- cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
+ cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wa,--noexecstack")),
bin_cflags => "-pie",
},
+ "android-clang" => {
+ inherit_from => [ "linux-generic32" ],
+ cc => "clang",
+ cflags => add(picker(default => "-fPIC --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Qunused-arguments -Wa,--noexecstack")),
+},
"android-x86" => {
inherit_from => [ "android", asm("x86_asm") ],
cflags => add(picker(release => "-fomit-frame-pointer")),
bn_ops => "BN_LLONG",
perlasm_scheme => "android",
},
+ "android-x86-clang" => {
+ inherit_from => [ "android-clang", asm("x86_asm") ],
+ cflags => add(picker(default => "-target i686-none-linux-android",
+ release => "-fomit-frame-pointer")),
+ bn_ops => "BN_LLONG",
+ perlasm_scheme => "android",
+ },
################################################################
# Contemporary Android applications can provide multiple JNI
# providers in .apk, targeting multiple architectures. Among
@@ -943,20 +955,38 @@
"android-armeabi" => {
inherit_from => [ "android", asm("armv4_asm") ],
},
+ "android-armeabi-clang" => {
+ inherit_from => [ "android-clang", asm("armv4_asm") ],
+ cflags => add("-target armv7-none-linux-androideabi"),
+ },
"android-mips" => {
inherit_from => [ "android", asm("mips32_asm") ],
perlasm_scheme => "o32",
},
-
+ "android-mips-clang" => {
+ inherit_from => [ "android-clang", asm("mips32_asm") ],
+ cflags => add("-target mipsel-none-linux-android"),
+ perlasm_scheme => "o32",
+ },
"android64" => {
inherit_from => [ "linux-generic64" ],
- cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
+ cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wa,--noexecstack")),
bin_cflags => "-pie",
},
+ "android64-clang" => {
+ inherit_from => [ "linux-generic64" ],
+ cc => "clang",
+ cflags => add(picker(default => "-fPIC --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Qunused-arguments -Wa,--noexecstack")),
+ },
"android64-aarch64" => {
inherit_from => [ "android64", asm("aarch64_asm") ],
perlasm_scheme => "linux64",
},
+ "android64-aarch64-clang" => {
+ inherit_from => [ "android64-clang", asm("aarch64_asm") ],
+ cflags => add("-target aarch64-none-linux-android"),
+ perlasm_scheme => "linux64",
+ },
#### *BSD
"BSD-generic32" => {
================================================
FILE: Build_android/openssl/openssl-1.1.0j.patch
================================================
This patch applies several changes that enable OpenSSL 1.1.0g to be built
for Android using either Clang or GCC toolchains.
diff -Naur org/Configurations/10-main.conf mod/Configurations/10-main.conf
--- org/Configurations/10-main.conf 2017-11-02 07:29:01.000000000 -0700
+++ mod/Configurations/10-main.conf 2018-01-18 10:59:41.675138500 -0800
@@ -910,15 +910,27 @@
# systems are perfectly capable of executing binaries targeting
# Froyo. Keep in mind that in the nutshell Android builds are
# about JNI, i.e. shared libraries, not applications.
- cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
+ cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wa,--noexecstack")),
bin_cflags => "-pie",
},
+ "android-clang" => {
+ inherit_from => [ "linux-generic32" ],
+ cc => "clang",
+ cflags => add(picker(default => "-fPIC --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Qunused-arguments -Wa,--noexecstack")),
+},
"android-x86" => {
inherit_from => [ "android", asm("x86_asm") ],
cflags => add(picker(release => "-fomit-frame-pointer")),
bn_ops => "BN_LLONG",
perlasm_scheme => "android",
},
+ "android-x86-clang" => {
+ inherit_from => [ "android-clang", asm("x86_asm") ],
+ cflags => add(picker(default => "-target i686-none-linux-android",
+ release => "-fomit-frame-pointer")),
+ bn_ops => "BN_LLONG",
+ perlasm_scheme => "android",
+ },
################################################################
# Contemporary Android applications can provide multiple JNI
# providers in .apk, targeting multiple architectures. Among
@@ -943,20 +955,38 @@
"android-armeabi" => {
inherit_from => [ "android", asm("armv4_asm") ],
},
+ "android-armeabi-clang" => {
+ inherit_from => [ "android-clang", asm("armv4_asm") ],
+ cflags => add("-target armv7-none-linux-androideabi"),
+ },
"android-mips" => {
inherit_from => [ "android", asm("mips32_asm") ],
perlasm_scheme => "o32",
},
-
+ "android-mips-clang" => {
+ inherit_from => [ "android-clang", asm("mips32_asm") ],
+ cflags => add("-target mipsel-none-linux-android"),
+ perlasm_scheme => "o32",
+ },
"android64" => {
inherit_from => [ "linux-generic64" ],
- cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack")),
+ cflags => add(picker(default => "-mandroid -fPIC --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wa,--noexecstack")),
bin_cflags => "-pie",
},
+ "android64-clang" => {
+ inherit_from => [ "linux-generic64" ],
+ cc => "clang",
+ cflags => add(picker(default => "-fPIC --gcc-toolchain=\$(ANDROID_GCC_TOOLCHAIN) --sysroot=\$(ANDROID_LINK_SYSROOT) -isystem \$(ANDROID_SYSROOT)/usr/include -isystem \$(ANDROID_SYSROOT)/usr/include/\$(ANDROID_TRIPLE) -D__ANDROID_API__=\$(ANDROID_API) -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Qunused-arguments -Wa,--noexecstack")),
+ },
"android64-aarch64" => {
inherit_from => [ "android64", asm("aarch64_asm") ],
perlasm_scheme => "linux64",
},
+ "android64-aarch64-clang" => {
+ inherit_from => [ "android64-clang", asm("aarch64_asm") ],
+ cflags => add("-target aarch64-none-linux-android"),
+ perlasm_scheme => "linux64",
+ },
#### *BSD
"BSD-generic32" => {
================================================
FILE: Build_iOS/.gitignore
================================================
# iOS folders that dependencies get stored in
boostoniphone/
boost
boost.framework/
ios-cmake/
openssl/
OpenSSL-for-iPhone/
================================================
FILE: Build_iOS/CMakeLists.txt
================================================
project(casablanca-ios NONE)
cmake_minimum_required(VERSION 3.9)
enable_testing()
set(LIB_CPPREST libcpprest.a)
set(LIB_CPPREST_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/lib")
if (CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set (ENV{CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET} ${CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET})
endif()
set(TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ios-cmake/ios.toolchain.cmake")
set(SIM_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/build.i386" CACHE INTERNAL "")
set(SIM_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Release" CACHE INTERNAL "")
set(SIM64_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/build.x86_64" CACHE INTERNAL "")
set(SIM64_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Release" CACHE INTERNAL "")
set(ARM_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/build.arm" CACHE INTERNAL "")
set(ARM_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Release" CACHE INTERNAL "")
if (DISABLE_BITCODE)
set (ENABLE_BITCODE_ARG -DENABLE_BITCODE=OFF)
endif()
if (INCLUDE_32BIT)
set (IOS_PLATFORM_VALUE OS)
else()
set (IOS_PLATFORM_VALUE OS64)
endif()
if (DEPLOYMENT_TARGET)
set (DEPLOYMENT_TARGET -DIOS_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET})
endif()
add_test(NAME ios_runner
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../Release/tests/common/testrunner/ios
COMMAND xcodebuild test -project ios_runner.xcodeproj -configuration=${CMAKE_BUILD_TYPE} -scheme ios_runner -destination "platform=iOS Simulator,name=iPhone 6" LIBRARY_SEARCH_PATH=${SIM64_BINARY_DIR}
)
if (INCLUDE_32BIT)
set (SIM_BINARY_LIB ${SIM_BINARY_DIR}/Binaries/${CMAKE_BUILD_TYPE}/${LIB_CPPREST})
file(MAKE_DIRECTORY ${SIM_BINARY_DIR})
execute_process(WORKING_DIRECTORY ${SIM_BINARY_DIR}
COMMAND ${CMAKE_COMMAND}
-GXcode
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
-DIOS_PLATFORM=SIMULATOR
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"${DEPLOYMENT_TARGET}"
"${SIM_SOURCE_DIR}"
)
else()
set (SIM_BINARY_LIB "")
endif()
file(MAKE_DIRECTORY ${SIM64_BINARY_DIR})
execute_process(WORKING_DIRECTORY ${SIM64_BINARY_DIR}
COMMAND ${CMAKE_COMMAND}
-GXcode
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
-DIOS_PLATFORM=SIMULATOR64
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"${DEPLOYMENT_TARGET}"
"${SIM64_SOURCE_DIR}"
)
file(MAKE_DIRECTORY ${ARM_BINARY_DIR})
execute_process(WORKING_DIRECTORY ${ARM_BINARY_DIR}
COMMAND ${CMAKE_COMMAND}
-GXcode
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
-DIOS_PLATFORM=${IOS_PLATFORM_VALUE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
"${DEPLOYMENT_TARGET}"
"${ENABLE_BITCODE_ARG}"
"${ARM_SOURCE_DIR}"
)
if (INCLUDE_32BIT)
set (SIM_TARGET sim)
## Simulator i386 version
add_custom_target(sim
COMMAND ${CMAKE_COMMAND}
--build ${SIM_BINARY_DIR}
--config ${CMAKE_BUILD_TYPE}
COMMENT "Building for i386 (simulator)"
VERBATIM
)
else()
set (SIM_TARGET "")
endif()
## Simulator x86_64 version
add_custom_target(sim64
COMMAND ${CMAKE_COMMAND}
--build ${SIM64_BINARY_DIR}
--config ${CMAKE_BUILD_TYPE}
COMMENT "Building for x86_64 (simulator)"
VERBATIM
)
## ARM version
add_custom_target(arm
COMMAND ${CMAKE_COMMAND}
--build ${ARM_BINARY_DIR}
--config ${CMAKE_BUILD_TYPE}
COMMENT "Building for arm"
VERBATIM
)
add_custom_command(
OUTPUT ${LIB_CPPREST_LIB_DIR}/${LIB_CPPREST}
COMMAND mkdir -p "${LIB_CPPREST_LIB_DIR}"
COMMAND lipo -create
-output "${LIB_CPPREST_LIB_DIR}/${LIB_CPPREST}"
${SIM_BINARY_LIB}
${SIM64_BINARY_DIR}/Binaries/${CMAKE_BUILD_TYPE}/${LIB_CPPREST}
${ARM_BINARY_DIR}/Binaries/${CMAKE_BUILD_TYPE}/${LIB_CPPREST}
COMMAND cp -R "${CMAKE_CURRENT_SOURCE_DIR}/../Release/include" "${CMAKE_CURRENT_BINARY_DIR}"
DEPENDS
${SIM_TARGET}
sim64
arm
${SIM_BINARY_LIB}
"${SIM64_BINARY_DIR}/Binaries/${CMAKE_BUILD_TYPE}/${LIB_CPPREST}"
"${ARM_BINARY_DIR}/Binaries/${CMAKE_BUILD_TYPE}/${LIB_CPPREST}"
VERBATIM
)
add_custom_target(cpprest ALL DEPENDS "${LIB_CPPREST_LIB_DIR}/${LIB_CPPREST}")
================================================
FILE: Build_iOS/README.md
================================================
Please consult the documentation [here](https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-iOS) for iOS compilation.
================================================
FILE: Build_iOS/configure.sh
================================================
#!/usr/bin/env bash
set -e
usage() {
echo "Usage: configure.sh [-build_type type] [-deployment_target version] [-config_only] [-include_32bit] [-no_bitcode]"
echo " -build_type defines the CMAKE_BUILD_TYPE used. Defaults to Release."
echo " -deployment_target defines minimum iOS Deployment Target. The default is dependent on ios.toolchain.cmake and currently defaults to 8.0"
echo " -config_only only configures cmake (no make invoked)."
echo " -include_32bit includes the 32-bit arm architectures."
echo " -no_bitcode disables bitcode"
echo " -clean deletes build directory prior to configuring"
}
ABS_PATH="`dirname \"$0\"`" # relative
ABS_PATH="`( cd \"${ABS_PATH}\" && pwd )`" # absolutized and normalized
# Make sure that the path to this file exists and can be retrieved!
if [ -z "${ABS_PATH}" ]; then
echo "Could not fetch the ABS_PATH."
exit 1
fi
CONFIG_ONLY=0
INCLUDE_32BIT=""
DISABLE_BITCODE=""
DEPLOYMENT_TARGET=""
CLEAN=0
# Command line argument parsing
while (( "$#" )); do
case "$1" in
-build_type)
if [ "$#" -lt 2 ] || [[ "$2" == -* ]] ; then
usage
echo "Error: argument $1 expecting a value to follow."
exit 1
fi
CPPRESTSDK_BUILD_TYPE=$2
shift 2
;;
-deployment_target)
if [ "$#" -lt 2 ] || [[ "$2" == -* ]] ; then
usage
echo "Error: argument $1 expecting a value to follow."
exit 1
fi
DEPLOYMENT_TARGET="-DDEPLOYMENT_TARGET=$2"
shift 2
;;
-config_only)
CONFIG_ONLY=1
shift 1
;;
-include_32bit)
INCLUDE_32BIT="-DINCLUDE_32BIT=ON"
shift 1
;;
-no_bitcode)
DISABLE_BITCODE="-DDISABLE_BITCODE=ON"
shift 1
;;
-clean)
CLEAN=1
shift 1
;;
*)
usage
echo "Error: unsupported argument $1"
exit 1
;;
esac
done
## Configuration
DEFAULT_BOOST_VERSION=1.69.0
DEFAULT_OPENSSL_VERSION=1.1.0k
BOOST_VERSION=${BOOST_VERSION:-${DEFAULT_BOOST_VERSION}}
OPENSSL_VERSION=${OPENSSL_VERSION:-${DEFAULT_OPENSSL_VERSION}}
CPPRESTSDK_BUILD_TYPE=${CPPRESTSDK_BUILD_TYPE:-Release}
############################ No need to edit anything below this line
## Set some needed variables
IOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
## Buildsteps below
## Fetch submodules just in case
git submodule update --init
## Build Boost
if [ ! -e $ABS_PATH/boost.framework ] && [ ! -d $ABS_PATH/boost ]; then
if [ ! -d "${ABS_PATH}/Apple-Boost-BuildScript" ]; then
git clone https://github.com/faithfracture/Apple-Boost-BuildScript ${ABS_PATH}/Apple-Boost-BuildScript
fi
pushd ${ABS_PATH}/Apple-Boost-BuildScript
git checkout 8c42427b4ebc7865eb99b0a0b9607888af2c6abc
BOOST_LIBS="thread chrono filesystem regex system random" ./boost.sh -ios -tvos --boost-version $BOOST_VERSION
popd
mv ${ABS_PATH}/Apple-Boost-BuildScript/build/boost/${BOOST_VERSION}/ios/framework/boost.framework ${ABS_PATH}
mv ${ABS_PATH}/boost.framework/Versions/A/Headers ${ABS_PATH}/boost.headers
mkdir -p ${ABS_PATH}/boost.framework/Versions/A/Headers
mv ${ABS_PATH}/boost.headers ${ABS_PATH}/boost.framework/Versions/A/Headers/boost
fi
## Build OpenSSL
if [ ! -e ${ABS_PATH}/openssl/lib/libcrypto.a ]; then
if [ ! -d "${ABS_PATH}/OpenSSL-for-iPhone" ]; then
git clone --depth=1 https://github.com/x2on/OpenSSL-for-iPhone.git ${ABS_PATH}/OpenSSL-for-iPhone
fi
pushd ${ABS_PATH}/OpenSSL-for-iPhone
git checkout 6c665e2a15ba7e834875eecaf4eb93c11605dd9a
./build-libssl.sh --version=${OPENSSL_VERSION}
popd
mkdir -p ${ABS_PATH}/openssl/lib
if [ -e ${ABS_PATH}/OpenSSL-for-iPhone/bin/iPhoneOS${IOS_SDK_VERSION}-arm64.sdk/include ]
then
cp -r ${ABS_PATH}/OpenSSL-for-iPhone/bin/iPhoneOS${IOS_SDK_VERSION}-arm64.sdk/include ${ABS_PATH}/openssl
else
echo 'Could not find OpenSSL for iPhone'
exit 1
fi
cp ${ABS_PATH}/OpenSSL-for-iPhone/include/LICENSE ${ABS_PATH}/openssl
lipo -create -output ${ABS_PATH}/openssl/lib/libssl.a ${ABS_PATH}/OpenSSL-for-iPhone/bin/iPhone*/lib/libssl.a
lipo -create -output ${ABS_PATH}/openssl/lib/libcrypto.a ${ABS_PATH}/OpenSSL-for-iPhone/bin/iPhone*/lib/libcrypto.a
fi
## Fetch CMake toolchain
if [ ! -e ${ABS_PATH}/ios-cmake/ios.toolchain.cmake ]; then
if [ ! -d "${ABS_PATH}/ios-cmake" ]; then
git clone https://github.com/leetal/ios-cmake ${ABS_PATH}/ios-cmake
fi
pushd ${ABS_PATH}/ios-cmake
git checkout 2.1.2
popd
fi
## Build CPPRestSDK
if [ -d "${ABS_PATH}/build.${CPPRESTSDK_BUILD_TYPE}.ios" ]; then
if [ "$CLEAN" -eq 1 ]; then
echo "Removing directory ${ABS_PATH}/build.${CPPRESTSDK_BUILD_TYPE}.ios prior to configuring."
rm -rf "${ABS_PATH}/build.${CPPRESTSDK_BUILD_TYPE}.ios"
else
printf "WARNING: Running configure on an already existing configuration.\nAny changes to the existing configuration will not be picked up.\nEither remove the directory and re-run configure or run configure with the -clean flag.\n\n"
fi
fi
mkdir -p ${ABS_PATH}/build.${CPPRESTSDK_BUILD_TYPE}.ios
pushd ${ABS_PATH}/build.${CPPRESTSDK_BUILD_TYPE}.ios
cmake -DCMAKE_BUILD_TYPE=${CPPRESTSDK_BUILD_TYPE} .. ${INCLUDE_32BIT} ${DISABLE_BITCODE} ${DEPLOYMENT_TARGET}
if [ "$CONFIG_ONLY" -eq 0 ]; then
make
printf "\n\n===================================================================================\n"
echo ">>>> The final library is available in 'build.${CPPRESTSDK_BUILD_TYPE}.ios/lib/libcpprest.a'"
printf "===================================================================================\n\n"
else
printf "\n\n===================================================================================\n"
echo ">>>> Configuration complete. Run 'make' in 'build.${CPPRESTSDK_BUILD_TYPE}.ios' to build."
printf "===================================================================================\n\n"
fi
popd
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.9)
project(cpprestsdk-root NONE)
enable_testing()
add_subdirectory(Release)
================================================
FILE: CONTRIBUTORS.txt
================================================
Contributors should submit an update to this file with a commit in order to receive recognition. Thank you for your contributions.
List of Contributors
====================
Microsoft Corporation
Brian Wengert (bwengert79)
Leslie Brody (Les1966)
Michael M (M1xa)
Matt Peterson (MattPeterson1)
Dmitry Kolomiets (kolomiets)
rdeterre
DeCarabas
luisfeliu
intercommiura
halex2005
simonlep
jracle
gandziej
adish
LeonidCSIT
kreuzerkrieg
evanc
Jesse Towner (jwtowner)
Abinsula s.r.l.
Gianfranco Costamagna (LocutusOfBorg)
AutoDesk Inc.
Cyrille Fauvel (cyrillef)
Illumina Inc.
Gery Vessere (gery@vessere.com)
Cisco Systems
Gergely Lukacsy (glukacsy)
Chris Deering (deeringc)
Ocedo GmbH
Henning Pfeiffer (megaposer)
thomasschaub
Trimble
Tim Boundy (gigaplex)
Rami Abughazaleh (icnocop)
TastenTrick
Christian Deneke (chris0x44)
leetal
Benjamin Lee (mobileben)
René Meusel (reneme)
Sony Corporation
Gareth Sylvester-Bradley (garethsb-sony)
================================================
FILE: README.md
================================================
**cpprestsdk is in maintenance mode and we do not recommend its use in new projects. We will continue to fix critical bugs and address security issues.**
## Welcome!
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
## Getting Started
[](https://repology.org/metapackage/cpprestsdk)</br>
[](https://repology.org/metapackage/cpprestsdk)</br>
[](https://repology.org/metapackage/cpprestsdk)</br>
[](https://repology.org/metapackage/cpprestsdk)</br>
[](https://repology.org/metapackage/cpprestsdk)</br>
[](https://repology.org/metapackage/cpprestsdk)</br>
[](https://dev.azure.com/vclibs/cpprestsdk/_build/latest?definitionId=1)
With [vcpkg](https://github.com/Microsoft/vcpkg) on Windows
```
PS> vcpkg install cpprestsdk cpprestsdk:x64-windows
```
With [apt-get](https://launchpad.net/ubuntu/+source/casablanca/2.8.0-2build2) on Debian/Ubuntu
```
$ sudo apt-get install libcpprest-dev
```
With [dnf](https://apps.fedoraproject.org/packages/cpprest) on Fedora
```
$ sudo dnf install cpprest-devel
```
With [brew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/cpprestsdk.rb) on OSX
```
$ brew install cpprestsdk
```
With [NuGet](https://www.nuget.org/packages/cpprestsdk.android/) on Windows for Android
```
PM> Install-Package cpprestsdk.android
```
For other platforms, install options, how to build from source, and more, take a look at our [Documentation](https://github.com/Microsoft/cpprestsdk/wiki).
Once you have the library, look at our [tutorial](https://github.com/Microsoft/cpprestsdk/wiki/Getting-Started-Tutorial) to use the http_client. It walks through how to setup a project to use the C++ Rest SDK and make a basic Http request.
To use from CMake:
```cmake
cmake_minimum_required(VERSION 3.9)
project(main)
find_package(cpprestsdk REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE cpprestsdk::cpprest)
```
## What's in the SDK:
* Features - HTTP client/server, JSON, URI, asynchronous streams, WebSockets client, oAuth
* PPL Tasks - A powerful model for composing asynchronous operations based on C++ 11 features
* Platforms - Windows desktop, Windows Store (UWP), Linux, OS X, Unix, iOS, and Android
* Support for [Visual Studio 2015 and 2017](https://visualstudio.microsoft.com/) with debugger visualizers
## Contribute Back!
Is there a feature missing that you'd like to see, or found a bug that you have a fix for? Or do you have an idea or just interest in helping out in building the library? Let us know and we'd love to work with you. For a good starting point on where we are headed and feature ideas, take a look at our [requested features and bugs](https://github.com/Microsoft/cpprestsdk/issues).
Big or small we'd like to take your [contributions](https://github.com/Microsoft/cpprestsdk/wiki/Make-a-contribution-and-report-issues) back to help improve the C++ Rest SDK for everyone.
## Having Trouble?
We'd love to get your review score, whether good or bad, but even more than that, we want to fix your problem. If you submit your issue as a Review, we won't be able to respond to your problem and ask any follow-up questions that may be necessary. The most efficient way to do that is to open an issue in our [issue tracker](https://github.com/Microsoft/cpprestsdk/issues).
### Quick Links
* [FAQ](https://github.com/Microsoft/cpprestsdk/wiki/FAQ)
* [Documentation](https://github.com/Microsoft/cpprestsdk/wiki)
* [Issue Tracker](https://github.com/Microsoft/cpprestsdk/issues)
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
================================================
FILE: Release/.gitignore
================================================
.ninja_*
*.ninja
CMakeFiles/
CMakeCache.txt
CTestTestfile.cmake
cmake_install.cmake
================================================
FILE: Release/CMakeLists.txt
================================================
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
cmake_minimum_required(VERSION 3.9)
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # use MACOSX_RPATH
endif()
if(UNIX)
project(cpprestsdk C CXX)
else()
project(cpprestsdk CXX)
endif()
set(CPPREST_VERSION_MAJOR 2)
set(CPPREST_VERSION_MINOR 10)
set(CPPREST_VERSION_REVISION 19)
enable_testing()
set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
set(CPPREST_EXCLUDE_BROTLI ON CACHE BOOL "Exclude Brotli compression functionality.")
set(CPPREST_EXPORT_DIR cmake/cpprestsdk CACHE STRING "Directory to install CMake config files.")
set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
if(IOS OR ANDROID)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
else()
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
endif()
if(IOS OR ANDROID OR WINDOWS_STORE OR WINDOWS_PHONE)
set(BUILD_TESTS OFF CACHE BOOL "Build tests.")
set(BUILD_SAMPLES OFF CACHE BOOL "Build sample applications.")
else()
set(BUILD_TESTS ON CACHE BOOL "Build tests.")
set(BUILD_SAMPLES ON CACHE BOOL "Build sample applications.")
endif()
if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Default filename postfix for libraries under configuration DEBUG")
else()
set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Default filename postfix for libraries under configuration DEBUG")
endif()
if(WIN32)
set(TOOLSET)
if(CMAKE_VS_PLATFORM_TOOLSET)
string(REGEX REPLACE "^v" "" TOOLSET "${CMAKE_VS_PLATFORM_TOOLSET}")
endif()
set(CPPREST_ABI_TAG "${TOOLSET}_${CPPREST_VERSION_MAJOR}_${CPPREST_VERSION_MINOR}" CACHE STRING "Postfix tag for the cpprest abi")
else()
set(CPPREST_ABI_TAG "" CACHE STRING "Postfix tag for the cpprest abi")
endif()
if(ANDROID)
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "Link against boost statically.")
else()
set(Boost_USE_STATIC_LIBS OFF CACHE BOOL "Link against boost statically.")
endif()
include(cmake/cpprest_find_boost.cmake)
include(cmake/cpprest_find_zlib.cmake)
include(cmake/cpprest_find_winhttppal.cmake)
include(cmake/cpprest_find_openssl.cmake)
include(cmake/cpprest_find_websocketpp.cmake)
include(cmake/cpprest_find_brotli.cmake)
include(CheckIncludeFiles)
include(GNUInstallDirs)
find_package(Threads REQUIRED)
if(THREADS_HAVE_PTHREAD_ARG)
add_compile_options(-pthread)
endif()
if(CMAKE_THREAD_LIBS_INIT)
link_libraries(${CMAKE_THREAD_LIBS_INIT})
endif()
# Internal component selection logic. This allows us to avoid duplicating platform logic in multiple places.
if(CPPREST_EXCLUDE_WEBSOCKETS)
set(CPPREST_WEBSOCKETS_IMPL none CACHE STRING "Internal use.")
endif()
if(NOT WIN32)
CHECK_INCLUDE_FILES(xlocale.h HAVE_XLOCALE_H)
endif()
if(APPLE) # Note: also iOS
set(CPPREST_PPLX_IMPL apple CACHE STRING "Internal use.")
set(CPPREST_WEBSOCKETS_IMPL wspp CACHE STRING "Internal use.")
set(CPPREST_FILEIO_IMPL posix CACHE STRING "Internal use.")
set(CPPREST_HTTP_CLIENT_IMPL asio CACHE STRING "Internal use.")
set(CPPREST_HTTP_LISTENER_IMPL asio CACHE STRING "Internal use.")
elseif(UNIX AND NOT APPLE) # Note: also android
set(CPPREST_PPLX_IMPL linux CACHE STRING "Internal use.")
set(CPPREST_WEBSOCKETS_IMPL wspp CACHE STRING "Internal use.")
set(CPPREST_FILEIO_IMPL posix CACHE STRING "Internal use.")
set(CPPREST_HTTP_CLIENT_IMPL asio CACHE STRING "Internal use.")
set(CPPREST_HTTP_LISTENER_IMPL asio CACHE STRING "Internal use.")
elseif(WINDOWS_PHONE OR WINDOWS_STORE)
set(CPPREST_PPLX_IMPL winrt CACHE STRING "Internal use.")
set(CPPREST_WEBSOCKETS_IMPL winrt CACHE STRING "Internal use.")
set(CPPREST_FILEIO_IMPL winrt CACHE STRING "Internal use.")
set(CPPREST_HTTP_CLIENT_IMPL winrt CACHE STRING "Internal use.")
set(CPPREST_HTTP_LISTENER_IMPL none CACHE STRING "Internal use.")
elseif(WIN32)
set(CPPREST_PPLX_IMPL win CACHE STRING "Internal use.")
set(CPPREST_WEBSOCKETS_IMPL wspp CACHE STRING "Internal use.")
set(CPPREST_FILEIO_IMPL win32 CACHE STRING "Internal use.")
set(CPPREST_HTTP_CLIENT_IMPL winhttp CACHE STRING "Internal use.")
set(CPPREST_HTTP_LISTENER_IMPL httpsys CACHE STRING "Internal use.")
else()
message(FATAL_ERROR "Unknown platform. Cannot determine appropriate feature implementations.")
endif()
set(WARNINGS)
set(ANDROID_LIBS)
# Platform (not compiler) specific settings
if(ANDROID)
# These are used in the shared library case
set(ANDROID_LIBS atomic dl)
elseif(UNIX) # This includes OSX
elseif(WIN32)
add_definitions(-DUNICODE -D_UNICODE -DWIN32 -D_SCL_SECURE_NO_WARNINGS)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_definitions(-D_WIN32_WINNT=0x0A00)
else()
add_definitions(-D_WIN32_WINNT=0x0600)
endif()
if(NOT BUILD_SHARED_LIBS)
# This causes cmake to not link the test libraries separately, but instead hold onto their object files.
set(TEST_LIBRARY_TARGET_TYPE OBJECT)
endif()
add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
else()
message(FATAL_ERROR "-- Unsupported Build Platform.")
endif()
# Compiler (not platform) specific settings
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR IOS)
message("-- Setting clang options")
if(ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pedantic -Wno-attributes -Wno-pointer-arith")
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(WARNINGS -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls)
set(LINUX_SUPPRESSIONS -Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-unused-local-typedefs)
set(WARNINGS ${WARNINGS} ${LINUX_SUPPRESSIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
else()
set(WARNINGS -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls)
set(OSX_SUPPRESSIONS -Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-unused-local-typedefs)
set(WARNINGS ${WARNINGS} ${OSX_SUPPRESSIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
message("-- Setting gcc options")
set(WARNINGS -Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code)
set(LD_FLAGS "${LD_FLAGS} -Wl,-z,defs")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -D_GLIBCXX_USE_SCHED_YIELD -D_GLIBCXX_USE_NANOSLEEP")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
message("-- Setting msvc options")
set(WARNINGS)
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4264")
add_compile_options(/bigobj)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MP")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MP")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MP")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MP")
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /profile /OPT:REF /OPT:ICF")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /profile /OPT:REF /OPT:ICF")
if (WINDOWS_STORE OR WINDOWS_PHONE)
add_compile_options(/ZW)
else()
if (NOT (MSVC_VERSION LESS 1920))
add_compile_options(/permissive-)
endif()
endif()
else()
message("-- Unknown compiler, success is doubtful.")
message("CMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}")
endif()
# Reconfigure final output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
function(configure_pch target precompile_header precomile_source) # optional additional compile arguments
if(MSVC)
get_target_property(_srcs ${target} SOURCES)
set(pch_output_filepath_arg)
if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*")
set_property(SOURCE ${precomile_source} APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/${target}.pch")
set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${target}.pch")
set(pch_output_filepath_arg "/Fp${CMAKE_CURRENT_BINARY_DIR}/${target}.pch")
else()
# Don't specify output file so that VS may choose a config spefic location.
# Otherwise Debug/Release builds will interfere with one another.
endif()
set_source_files_properties(${precomile_source} PROPERTIES COMPILE_FLAGS "/Yc${precompile_header}")
target_sources(${target} PRIVATE ${precomile_source})
# Note: as ${precomile_source} is also a SOURCE for ${target}, the below options will also be applied.
# ${precomile_source} has /Yc option that will cause the shared /Yu to be ignored.
target_compile_options(${target} PRIVATE /Yu${precompile_header} ${pch_output_filepath_arg} ${ARGN})
endif()
endfunction()
# These settings can be used by the test targets
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(Casablanca_LIBRARY cpprest)
set(Casablanca_LIBRARIES cpprest)
get_directory_property(PARENT_DIR PARENT_DIRECTORY)
if(NOT PARENT_DIR STREQUAL "")
set(Casablanca_LIBRARIES ${Casablanca_LIBRARIES} PARENT_SCOPE)
endif()
# Finally, the tests all use the same style declaration to build themselves, so we use a function
function(add_casablanca_test NAME SOURCES_VAR)
add_library(${NAME} ${TEST_LIBRARY_TARGET_TYPE} ${${SOURCES_VAR}})
message("-- Added test library ${NAME}")
if(TEST_LIBRARY_TARGET_TYPE STREQUAL "OBJECT")
foreach(_dep cpprest common_utilities unittestpp)
target_include_directories(${NAME} PRIVATE $<TARGET_PROPERTY:${_dep},INTERFACE_INCLUDE_DIRECTORIES>)
target_compile_definitions(${NAME} PRIVATE $<TARGET_PROPERTY:${_dep},INTERFACE_COMPILE_DEFINITIONS>)
endforeach()
else()
target_link_libraries(${NAME} PRIVATE
cpprest
common_utilities
unittestpp
${ANDROID_LIBS}
)
if (BUILD_SHARED_LIBS)
add_test(NAME ${NAME}
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND test_runner $<TARGET_FILE_NAME:${NAME}>
)
endif()
endif()
endfunction()
add_subdirectory(src)
if(BUILD_TESTS)
add_subdirectory(tests)
endif()
if(BUILD_SAMPLES)
add_subdirectory(samples)
endif()
================================================
FILE: Release/cmake/cpprest_find_boost.cmake
================================================
macro(cpprestsdk_find_boost_android_package)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
if(CMAKE_HOST_WIN32)
set(WIN32 1)
set(UNIX)
elseif(CMAKE_HOST_APPLE)
set(APPLE 1)
set(UNIX)
endif()
find_package(${ARGN})
set(APPLE)
set(WIN32)
set(UNIX 1)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
endmacro()
function(cpprest_find_boost)
if(TARGET cpprestsdk_boost_internal)
return()
endif()
if(IOS)
if (EXISTS "${PROJECT_SOURCE_DIR}/../Build_iOS/boost")
set(IOS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../Build_iOS")
set(Boost_LIBRARIES "${IOS_SOURCE_DIR}/boost/lib" CACHE INTERNAL "")
set(Boost_INCLUDE_DIR "${IOS_SOURCE_DIR}/boost/include" CACHE INTERNAL "")
else()
set(IOS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../Build_iOS")
set(Boost_LIBRARIES "${IOS_SOURCE_DIR}/boost.framework/boost" CACHE INTERNAL "")
set(Boost_INCLUDE_DIR "${IOS_SOURCE_DIR}/boost.framework/Headers" CACHE INTERNAL "")
endif()
elseif(ANDROID)
set(Boost_COMPILER "-clang")
if(ANDROID_ABI STREQUAL "armeabi-v7a")
set(BOOST_ROOT "${CMAKE_BINARY_DIR}/../Boost-for-Android/build/out/armeabi-v7a" CACHE INTERNAL "")
set(BOOST_LIBRARYDIR "${CMAKE_BINARY_DIR}/../Boost-for-Android/build/out/armeabi-v7a/lib" CACHE INTERNAL "")
set(Boost_ARCHITECTURE "-a32" CACHE INTERNAL "")
else()
set(BOOST_ROOT "${CMAKE_BINARY_DIR}/../Boost-for-Android/build/out/x86" CACHE INTERNAL "")
set(BOOST_LIBRARYDIR "${CMAKE_BINARY_DIR}/../Boost-for-Android/build/out/x86/lib" CACHE INTERNAL "")
set(Boost_ARCHITECTURE "-x32" CACHE INTERNAL "")
endif()
cpprestsdk_find_boost_android_package(Boost ${BOOST_VERSION} EXACT REQUIRED COMPONENTS random system thread filesystem chrono atomic)
elseif(UNIX)
find_package(Boost REQUIRED COMPONENTS random system thread filesystem chrono atomic date_time regex)
else()
find_package(Boost REQUIRED COMPONENTS system date_time regex)
endif()
add_library(cpprestsdk_boost_internal INTERFACE)
# FindBoost continually breaks imported targets whenever boost updates.
if(1)
target_include_directories(cpprestsdk_boost_internal INTERFACE "$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>")
set(_prev)
set(_libs)
foreach(_lib ${Boost_LIBRARIES})
if(_lib STREQUAL "optimized" OR _lib STREQUAL "debug")
else()
if(_prev STREQUAL "optimized")
list(APPEND _libs "$<$<NOT:$<CONFIG:Debug>>:${_lib}>")
elseif(_prev STREQUAL "debug")
list(APPEND _libs "$<$<CONFIG:Debug>:${_lib}>")
else()
list(APPEND _libs "${_lib}")
endif()
endif()
set(_prev "${_lib}")
endforeach()
if (NOT IOS OR NOT EXISTS "${PROJECT_SOURCE_DIR}/../Build_iOS/boost")
target_link_libraries(cpprestsdk_boost_internal INTERFACE "$<BUILD_INTERFACE:${_libs}>")
endif()
else()
if(ANDROID)
target_link_libraries(cpprestsdk_boost_internal INTERFACE
Boost::boost
Boost::random
Boost::system
Boost::thread
Boost::filesystem
Boost::chrono
Boost::atomic
)
elseif(UNIX)
target_link_libraries(cpprestsdk_boost_internal INTERFACE
Boost::boost
Boost::random
Boost::system
Boost::thread
Boost::filesystem
Boost::chrono
Boost::atomic
Boost::date_time
Boost::regex
)
else()
target_link_libraries(cpprestsdk_boost_internal INTERFACE
Boost::boost
Boost::system
Boost::date_time
Boost::regex
)
endif()
endif()
endfunction()
================================================
FILE: Release/cmake/cpprest_find_brotli.cmake
================================================
function(cpprest_find_brotli)
if(TARGET cpprestsdk_brotli_internal)
return()
endif()
find_package(PkgConfig)
pkg_check_modules(BROTLIENC libbrotlienc)
pkg_check_modules(BROTLIDEC libbrotlidec)
if(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
target_link_libraries(cpprest PRIVATE ${BROTLIDEC_LDFLAGS} ${BROTLIENC_LDFLAGS})
else(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
find_package(unofficial-brotli REQUIRED)
add_library(cpprestsdk_brotli_internal INTERFACE)
target_link_libraries(cpprestsdk_brotli_internal INTERFACE unofficial::brotli::brotlienc unofficial::brotli::brotlidec unofficial::brotli::brotlicommon)
target_link_libraries(cpprest PRIVATE cpprestsdk_brotli_internal)
endif(BROTLIDEC_FOUND AND BROTLIENC_FOUND)
endfunction()
================================================
FILE: Release/cmake/cpprest_find_openssl.cmake
================================================
function(cpprest_find_openssl)
if(TARGET cpprestsdk_openssl_internal)
return()
endif()
if(IOS)
set(IOS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../Build_iOS")
set(OPENSSL_INCLUDE_DIR "${IOS_SOURCE_DIR}/openssl/include" CACHE INTERNAL "")
set(OPENSSL_LIBRARIES
"${IOS_SOURCE_DIR}/openssl/lib/libcrypto.a"
"${IOS_SOURCE_DIR}/openssl/lib/libssl.a"
CACHE INTERNAL ""
)
set(_SSL_LEAK_SUPPRESS_AVAILABLE ON CACHE INTERNAL "")
elseif(ANDROID)
if(ARM)
set(OPENSSL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/../openssl/armeabi-v7a/include" CACHE INTERNAL "")
set(OPENSSL_LIBRARIES
"${CMAKE_BINARY_DIR}/../openssl/armeabi-v7a/lib/libssl.a"
"${CMAKE_BINARY_DIR}/../openssl/armeabi-v7a/lib/libcrypto.a"
CACHE INTERNAL ""
)
else()
set(OPENSSL_INCLUDE_DIR "${CMAKE_BINARY_DIR}/../openssl/x86/include" CACHE INTERNAL "")
set(OPENSSL_LIBRARIES
"${CMAKE_BINARY_DIR}/../openssl/x86/lib/libssl.a"
"${CMAKE_BINARY_DIR}/../openssl/x86/lib/libcrypto.a"
CACHE INTERNAL ""
)
endif()
set(_SSL_LEAK_SUPPRESS_AVAILABLE ON CACHE INTERNAL "")
else()
if(APPLE)
if(NOT DEFINED OPENSSL_ROOT_DIR)
# Prefer a homebrew version of OpenSSL over the one in /usr/lib
file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl*/*)
# Prefer the latest (make the latest one first)
list(REVERSE OPENSSL_ROOT_DIR)
list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR)
endif()
# This should prevent linking against the system provided 0.9.8y
message(STATUS "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}")
set(_OPENSSL_VERSION "")
endif()
if(UNIX)
find_package(PkgConfig)
pkg_search_module(OPENSSL openssl)
endif()
if(OPENSSL_FOUND)
target_link_libraries(cpprest PRIVATE ${OPENSSL_LDFLAGS})
else()
find_package(OpenSSL 1.0.0 REQUIRED)
endif()
INCLUDE(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
CHECK_CXX_SOURCE_COMPILES("
#include <openssl/ssl.h>
int main()
{
::SSL_COMP_free_compression_methods();
}
" _SSL_LEAK_SUPPRESS_AVAILABLE)
endif()
add_library(cpprestsdk_openssl_internal INTERFACE)
if(TARGET OpenSSL::SSL)
target_link_libraries(cpprestsdk_openssl_internal INTERFACE OpenSSL::SSL)
else()
target_link_libraries(cpprestsdk_openssl_internal INTERFACE "$<BUILD_INTERFACE:${OPENSSL_LIBRARIES}>")
target_include_directories(cpprestsdk_openssl_internal INTERFACE "$<BUILD_INTERFACE:${OPENSSL_INCLUDE_DIR}>")
endif()
if (NOT _SSL_LEAK_SUPPRESS_AVAILABLE)
# libressl doesn't ship with the cleanup method being used in ws_client_wspp
target_compile_definitions(cpprestsdk_openssl_internal INTERFACE -DCPPREST_NO_SSL_LEAK_SUPPRESS)
endif()
endfunction()
================================================
FILE: Release/cmake/cpprest_find_websocketpp.cmake
================================================
function(cpprest_find_websocketpp)
if(TARGET cpprestsdk_websocketpp_internal)
return()
endif()
find_package(WEBSOCKETPP CONFIG QUIET)
if(WEBSOCKETPP_FOUND)
message("-- Found websocketpp version " ${WEBSOCKETPP_VERSION} " on system")
set(WEBSOCKETPP_INCLUDE_DIR ${WEBSOCKETPP_INCLUDE_DIR} CACHE INTERNAL "")
elseif(EXISTS ${PROJECT_SOURCE_DIR}/libs/websocketpp/CMakeLists.txt)
message("-- websocketpp not found, using the embedded version")
set(WEBSOCKETPP_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/libs/websocketpp CACHE INTERNAL "")
else()
message(FATAL_ERROR "-- websocketpp not found and embedded version not present; try `git submodule update --init` and run CMake again")
endif()
cpprest_find_boost()
cpprest_find_openssl()
add_library(cpprestsdk_websocketpp_internal INTERFACE)
target_include_directories(cpprestsdk_websocketpp_internal INTERFACE "$<BUILD_INTERFACE:${WEBSOCKETPP_INCLUDE_DIR}>")
target_link_libraries(cpprestsdk_websocketpp_internal
INTERFACE
cpprestsdk_boost_internal
cpprestsdk_openssl_internal
)
endfunction()
================================================
FILE: Release/cmake/cpprest_find_winhttppal.cmake
================================================
function(cpprest_find_winhttppal)
if(TARGET cpprestsdk_winhttppal_internal)
return()
endif()
if(NOT WINHTTPPAL_LIBRARY OR NOT WINHTTPPAL_INCLUDE_DIRS)
find_package(winhttppal REQUIRED)
endif()
add_library(cpprestsdk_winhttppal_internal INTERFACE)
if(TARGET winhttppal::winhttppal)
target_link_libraries(cpprestsdk_winhttppal_internal INTERFACE winhttppal::winhttppal)
else()
target_link_libraries(cpprestsdk_winhttppal_internal INTERFACE "$<BUILD_INTERFACE:${WINHTTPPAL_LIBRARY}>")
target_include_directories(cpprestsdk_winhttppal_internal INTERFACE "$<BUILD_INTERFACE:${WINHTTPPAL_INCLUDE_DIRS}>")
endif()
endfunction()
================================================
FILE: Release/cmake/cpprest_find_zlib.cmake
================================================
function(cpprest_find_zlib)
if(TARGET cpprestsdk_zlib_internal)
return()
endif()
if(APPLE AND NOT IOS)
# Prefer the homebrew version of zlib
find_library(ZLIB_LIBRARY NAMES libz.a PATHS /usr/local/Cellar/zlib/1.2.8/lib NO_DEFAULT_PATH)
find_path(ZLIB_INCLUDE_DIRS NAMES zlib.h PATHS /usr/local/Cellar/zlib/1.2.8/include NO_DEFAULT_PATH)
if(NOT ZLIB_LIBRARY OR NOT ZLIB_INCLUDE_DIRS)
find_package(ZLIB REQUIRED)
endif()
else()
find_package(ZLIB REQUIRED)
endif()
add_library(cpprestsdk_zlib_internal INTERFACE)
if(TARGET ZLIB::ZLIB)
target_link_libraries(cpprestsdk_zlib_internal INTERFACE ZLIB::ZLIB)
else()
target_link_libraries(cpprestsdk_zlib_internal INTERFACE "$<BUILD_INTERFACE:${ZLIB_LIBRARY}>")
target_include_directories(cpprestsdk_zlib_internal INTERFACE "$<BUILD_INTERFACE:${ZLIB_INCLUDE_DIRS}>")
endif()
endfunction()
================================================
FILE: Release/cmake/cpprestsdk-config-version.in.cmake
================================================
set(PACKAGE_VERSION @CPPREST_VERSION_MAJOR@.@CPPREST_VERSION_MINOR@.@CPPREST_VERSION_REVISION@)
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
endif(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
================================================
FILE: Release/cmake/cpprestsdk-config.in.cmake
================================================
include(CMakeFindDependencyMacro)
if(@CPPREST_USES_ZLIB@)
find_dependency(ZLIB)
endif()
if(@CPPREST_USES_BROTLI@)
find_dependency(unofficial-brotli)
endif()
if(@CPPREST_USES_OPENSSL@)
find_dependency(OpenSSL)
endif()
if(@CPPREST_USES_WINHTTPPAL@)
find_dependency(WINHTTPPAL)
endif()
if(@CPPREST_USES_BOOST@)
if(UNIX)
find_dependency(Boost COMPONENTS random system thread filesystem chrono atomic date_time regex)
else()
find_dependency(Boost COMPONENTS system date_time regex)
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/cpprestsdk-targets.cmake")
================================================
FILE: Release/include/cpprest/astreambuf.h
================================================
/***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* Asynchronous I/O: stream buffer. This is an extension to the PPL concurrency features and therefore
* lives in the Concurrency namespace.
*
* For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
#pragma once
#include "cpprest/asyncrt_utils.h"
#include "cpprest/details/basic_types.h"
#include "pplx/pplxtasks.h"
#include <atomic>
#include <cstring>
#include <ios>
#include <math.h>
#include <memory>
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) && !CPPREST_FORCE_PPLX
namespace Concurrency // since namespace pplx = Concurrency
#else
namespace pplx
#endif
{
namespace details
{
template<class F, class T = bool>
pplx::task<T> _do_while(F func)
{
pplx::task<T> first = func();
return first.then([=](bool guard) -> pplx::task<T> {
if (guard)
return pplx::details::_do_while<F, T>(func);
else
return first;
});
}
} // namespace details
}
namespace Concurrency
{
/// Library for asynchronous streams.
namespace streams
{
/// <summary>
/// Extending the standard char_traits type with one that adds values and types
/// that are unique to "C++ REST SDK" streams.
/// </summary>
/// <typeparam name="_CharType">
/// The data type of the basic element of the stream.
/// </typeparam>
template<typename _CharType>
struct char_traits : std::char_traits<_CharType>
{
/// <summary>
/// Some synchronous functions will return this value if the operation
/// requires an asynchronous call in a given situation.
/// </summary>
/// <returns>An <c>int_type</c> value which implies that an asynchronous call is required.</returns>
static typename std::char_traits<_CharType>::int_type requires_async()
{
return std::char_traits<_CharType>::eof() - 1;
}
};
#if !defined(_WIN32)
template<>
struct char_traits<unsigned char> : private std::char_traits<char>
{
public:
typedef unsigned char char_type;
using std::char_traits<char>::eof;
using std::char_traits<char>::int_type;
using std::char_traits<char>::off_type;
using std::char_traits<char>::pos_type;
static size_t length(const unsigned char* str)
{
return std::char_traits<char>::length(reinterpret_cast<const char*>(str));
}
static void assign(unsigned char& left, const unsigned char& right) { left = right; }
static unsigned char* assign(unsigned char* left, size_t n, unsigned char value)
{
return reinterpret_cast<unsigned char*>(
std::char_traits<char>::assign(reinterpret_cast<char*>(left), n, static_cast<char>(value)));
}
static unsigned char* copy(unsigned char* left, const unsigned char* right, size_t n)
{
return reinterpret_cast<unsigned char*>(
std::char_traits<char>::copy(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
}
static unsigned char* move(unsigned char* left, const unsigned char* right, size_t n)
{
return reinterpret_cast<unsigned char*>(
std::char_traits<char>::move(reinterpret_cast<char*>(left), reinterpret_cast<const char*>(right), n));
}
static int_type requires_async() { return eof() - 1; }
};
#endif
namespace details
{
/// <summary>
/// Stream buffer base class.
/// </summary>
template<typename _CharType>
class basic_streambuf
{
public:
typedef _CharType char_type;
typedef ::concurrency::streams::char_traits<_CharType> traits;
typedef typename traits::int_type int_type;
typedef typename traits::pos_type pos_type;
typedef typename traits::off_type off_type;
/// <summary>
/// Virtual constructor for stream buffers.
/// </summary>
virtual ~basic_streambuf() {}
/// <summary>
/// <c>can_read</c> is used to determine whether a stream buffer will support read operations (get).
/// </summary>
virtual bool can_read() const = 0;
/// <summary>
/// <c>can_write</c> is used to determine whether a stream buffer will support write operations (put).
/// </summary>
virtual bool can_write() const = 0;
/// <summary>
/// <c>can_seek<c/> is used to determine whether a stream buffer supports seeking.
/// </summary>
virtual bool can_seek() const = 0;
/// <summary>
/// <c>has_size<c/> is used to determine whether a stream buffer supports size().
/// </summary>
virtual bool has_size() const = 0;
/// <summary>
/// <c>is_eof</c> is used to determine whether a read head has reached the end of the buffer.
/// </summary>
virtual bool is_eof() const = 0;
/// <summary>
/// Gets the stream buffer size, if one has been set.
/// </summary>
/// <param name="direction">The direction of buffering (in or out)</param>
/// <returns>The size of the internal buffer (for the given direction).</returns>
/// <remarks>An implementation that does not support buffering will always return 0.</remarks>
virtual size_t buffer_size(std::ios_base::openmode direction = std::ios_base::in) const = 0;
/// <summary>
/// Sets the stream buffer implementation to buffer or not buffer.
/// </summary>
/// <param name="size">The size to use for internal buffering, 0 if no buffering should be done.</param>
/// <param name="direction">The direction of buffering (in or out)</param>
/// <remarks>An implementation that does not support buffering will silently ignore calls to this function and it
/// will not have any effect on what is returned by subsequent calls to <see cref="::buffer_size method"
/// />.</remarks>
virtual void set_buffer_size(size_t size, std::ios_base::openmode direction = std::ios_base::in) = 0;
/// <summary>
/// For any input stream, <c>in_avail</c> returns the number of characters that are immediately available
/// to be consumed without blocking. May be used in conjunction with <cref="::sbumpc method"/> to read data without
/// incurring the overhead of using tasks.
/// </summary>
virtual size_t in_avail() const = 0;
/// <summary>
/// Checks if the stream buffer is open.
/// </summary>
/// <remarks>No separation is made between open for reading and open for writing.</remarks>
virtual bool is_open() const = 0;
/// <summary>
/// Closes the stream buffer, preventing further read or write operations.
/// </summary>
/// <param name="mode">The I/O mode (in or out) to close for.</param>
virtual pplx::task<void> close(std::ios_base::openmode mode = (std::ios_base::in | std::ios_base::out)) = 0;
/// <summary>
/// Closes the stream buffer with an exception.
/// </summary>
/// <param name="mode">The I/O mode (in or out) to close for.</param>
/// <param name="eptr">Pointer to the exception.</param>
virtual pplx::task<void> close(std::ios_base::openmode mode, std::exception_ptr eptr) = 0;
/// <summary>
/// Writes a single character to the stream.
/// </summary>
/// <param name="ch">The character to write</param>
/// <returns>A <c>task</c> that holds the value of the character. This value is EOF if the write operation
/// fails.</returns>
virtual pplx::task<int_type> putc(_CharType ch) = 0;
/// <summary>
/// Writes a number of characters to the stream.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be written.</param>
/// <param name="count">The number of characters to write.</param>
/// <returns>A <c>task</c> that holds the number of characters actually written, either 'count' or 0.</returns>
virtual pplx::task<size_t> putn(const _CharType* ptr, size_t count) = 0;
/// <summary>
/// Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until
/// the returned task completes.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be written.</param>
/// <param name="count">The number of characters to write.</param>
/// <returns>A <c>task</c> that holds the number of characters actually written, either 'count' or 0.</returns>
virtual pplx::task<size_t> putn_nocopy(const _CharType* ptr, size_t count) = 0;
/// <summary>
/// Reads a single character from the stream and advances the read position.
/// </summary>
/// <returns>A <c>task</c> that holds the value of the character. This value is EOF if the read fails.</returns>
virtual pplx::task<int_type> bumpc() = 0;
/// <summary>
/// Reads a single character from the stream and advances the read position.
/// </summary>
/// <returns>The value of the character. <c>-1</c> if the read fails. <c>-2</c> if an asynchronous read is
/// required</returns> <remarks>This is a synchronous operation, but is guaranteed to never block.</remarks>
virtual int_type sbumpc() = 0;
/// <summary>
/// Reads a single character from the stream without advancing the read position.
/// </summary>
/// <returns>A <c>task</c> that holds the value of the byte. This value is EOF if the read fails.</returns>
virtual pplx::task<int_type> getc() = 0;
/// <summary>
/// Reads a single character from the stream without advancing the read position.
/// </summary>
/// <returns>The value of the character. EOF if the read fails. <see cref="::requires_async method" /> if an
/// asynchronous read is required</returns> <remarks>This is a synchronous operation, but is guaranteed to never
/// block.</remarks>
virtual int_type sgetc() = 0;
/// <summary>
/// Advances the read position, then returns the next character without advancing again.
/// </summary>
/// <returns>A <c>task</c> that holds the value of the character. This value is EOF if the read fails.</returns>
virtual pplx::task<int_type> nextc() = 0;
/// <summary>
/// Retreats the read position, then returns the current character without advancing.
/// </summary>
/// <returns>A <c>task</c> that holds the value of the character. This value is EOF if the read fails,
/// <c>requires_async</c> if an asynchronous read is required</returns>
virtual pplx::task<int_type> ungetc() = 0;
/// <summary>
/// Reads up to a given number of characters from the stream.
/// </summary>
/// <param name="ptr">The address of the target memory area.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <returns>A <c>task</c> that holds the number of characters read. This value is O if the end of the stream is
/// reached.</returns>
virtual pplx::task<size_t> getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
/// <summary>
/// Copies up to a given number of characters from the stream, synchronously.
/// </summary>
/// <param name="ptr">The address of the target memory area.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <returns>The number of characters copied. O if the end of the stream is reached or an asynchronous read is
/// required.</returns> <remarks>This is a synchronous operation, but is guaranteed to never block.</remarks>
virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
/// <summary>
/// Gets the current read or write position in the stream.
/// </summary>
/// <param name="direction">The I/O direction to seek (see remarks)</param>
/// <returns>The current position. EOF if the operation fails.</returns>
/// <remarks>Some streams may have separate write and read cursors.
/// For such streams, the direction parameter defines whether to move the read or the write
/// cursor.</remarks>
virtual pos_type getpos(std::ios_base::openmode direction) const = 0;
/// <summary>
/// Gets the size of the stream, if known. Calls to <c>has_size</c> will determine whether
/// the result of <c>size</c> can be relied on.
/// </summary>
virtual utility::size64_t size() const = 0;
/// <summary>
/// Seeks to the given position.
/// </summary>
/// <param name="pos">The offset from the beginning of the stream.</param>
/// <param name="direction">The I/O direction to seek (see remarks).</param>
/// <returns>The position. EOF if the operation fails.</returns>
/// <remarks>Some streams may have separate write and read cursors. For such streams, the direction parameter
/// defines whether to move the read or the write cursor.</remarks>
virtual pos_type seekpos(pos_type pos, std::ios_base::openmode direction) = 0;
/// <summary>
/// Seeks to a position given by a relative offset.
/// </summary>
/// <param name="offset">The relative position to seek to</param>
/// <param name="way">The starting point (beginning, end, current) for the seek.</param>
/// <param name="mode">The I/O direction to seek (see remarks)</param>
/// <returns>The position. EOF if the operation fails.</returns>
/// <remarks>Some streams may have separate write and read cursors.
/// For such streams, the mode parameter defines whether to move the read or the write cursor.</remarks>
virtual pos_type seekoff(off_type offset, std::ios_base::seekdir way, std::ios_base::openmode mode) = 0;
/// <summary>
/// For output streams, flush any internally buffered data to the underlying medium.
/// </summary>
/// <returns>A <c>task</c> that returns <c>true</c> if the sync succeeds, <c>false</c> if not.</returns>
virtual pplx::task<void> sync() = 0;
//
// Efficient read and write.
//
// The following routines are intended to be used for more efficient, copy-free, reading and
// writing of data from/to the stream. Rather than having the caller provide a buffer into which
// data is written or from which it is read, the stream buffer provides a pointer directly to the
// internal data blocks that it is using. Since not all stream buffers use internal data structures
// to copy data, the functions may not be supported by all. An application that wishes to use this
// functionality should therefore first try them and check for failure to support. If there is
// such failure, the application should fall back on the copying interfaces (putn / getn)
//
/// <summary>
/// Allocates a contiguous memory block and returns it.
/// </summary>
/// <param name="count">The number of characters to allocate.</param>
/// <returns>A pointer to a block to write to, null if the stream buffer implementation does not support
/// alloc/commit.</returns>
virtual _CharType* alloc(_In_ size_t count) = 0;
/// <summary>
/// Submits a block already allocated by the stream buffer.
/// </summary>
/// <param name="count">The number of characters to be committed.</param>
virtual void commit(_In_ size_t count) = 0;
/// <summary>
/// Gets a pointer to the next already allocated contiguous block of data.
/// </summary>
/// <param name="ptr">A reference to a pointer variable that will hold the address of the block on success.</param>
/// <param name="count">The number of contiguous characters available at the address in 'ptr'.</param>
/// <returns><c>true</c> if the operation succeeded, <c>false</c> otherwise.</returns>
/// <remarks>
/// A return of false does not necessarily indicate that a subsequent read operation would fail, only that
/// there is no block to return immediately or that the stream buffer does not support the operation.
/// The stream buffer may not de-allocate the block until <see cref="::release method" /> is called.
/// If the end of the stream is reached, the function will return <c>true</c>, a null pointer, and a count of zero;
/// a subsequent read will not succeed.
/// </remarks>
virtual bool acquire(_Out_ _CharType*& ptr, _Out_ size_t& count) = 0;
/// <summary>
/// Releases a block of data acquired using <see cref="::acquire method"/>. This frees the stream buffer to
/// de-allocate the memory, if it so desires. Move the read position ahead by the count.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be released.</param>
/// <param name="count">The number of characters that were read.</param>
virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
/// <summary>
/// Retrieves the stream buffer exception_ptr if it has been set.
/// </summary>
/// <returns>Pointer to the exception, if it has been set; otherwise, <c>nullptr</c> will be returned</returns>
virtual std::exception_ptr exception() const = 0;
};
template<typename _CharType>
class streambuf_state_manager : public basic_streambuf<_CharType>,
public std::enable_shared_from_this<streambuf_state_manager<_CharType>>
{
public:
typedef typename details::basic_streambuf<_CharType>::traits traits;
typedef typename details::basic_streambuf<_CharType>::int_type int_type;
typedef typename details::basic_streambuf<_CharType>::pos_type pos_type;
typedef typename details::basic_streambuf<_CharType>::off_type off_type;
/// <summary>
/// <c>can_read</c> is used to determine whether a stream buffer will support read operations (get).
/// </summary>
virtual bool can_read() const { return m_stream_can_read; }
/// <summary>
/// <c>can_write</c> is used to determine whether a stream buffer will support write operations (put).
/// </summary>
virtual bool can_write() const { return m_stream_can_write; }
/// <summary>
/// Checks if the stream buffer is open.
/// </summary>
/// <remarks>No separation is made between open for reading and open for writing.</remarks>
virtual bool is_open() const { return can_read() || can_write(); }
/// <summary>
/// Closes the stream buffer, preventing further read or write operations.
/// </summary>
/// <param name="mode">The I/O mode (in or out) to close for.</param>
virtual pplx::task<void> close(std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
{
pplx::task<void> closeOp = pplx::task_from_result();
if (mode & std::ios_base::in && can_read())
{
closeOp = _close_read();
}
// After the flush_internal task completed, "this" object may have been destroyed,
// accessing the members is invalid, use shared_from_this to avoid access violation exception.
auto this_ptr = std::static_pointer_cast<streambuf_state_manager>(this->shared_from_this());
if (mode & std::ios_base::out && can_write())
{
if (closeOp.is_done())
closeOp = closeOp && _close_write().then([this_ptr] {}); // passing down exceptions from closeOp
else
closeOp = closeOp.then([this_ptr] { return this_ptr->_close_write().then([this_ptr] {}); });
}
return closeOp;
}
/// <summary>
/// Closes the stream buffer with an exception.
/// </summary>
/// <param name="mode">The I/O mode (in or out) to close for.</param>
/// <param name="eptr">Pointer to the exception.</param>
virtual pplx::task<void> close(std::ios_base::openmode mode, std::exception_ptr eptr)
{
if (m_currentException == nullptr) m_currentException = eptr;
return close(mode);
}
/// <summary>
/// <c>is_eof</c> is used to determine whether a read head has reached the end of the buffer.
/// </summary>
virtual bool is_eof() const { return m_stream_read_eof; }
/// <summary>
/// Writes a single character to the stream.
/// </summary>
/// <param name="ch">The character to write</param>
/// <returns>The value of the character. EOF if the write operation fails</returns>
virtual pplx::task<int_type> putc(_CharType ch)
{
if (!can_write()) return create_exception_checked_value_task<int_type>(traits::eof());
return create_exception_checked_task<int_type>(_putc(ch), [](int_type) {
return false; // no EOF for write
});
}
/// <summary>
/// Writes a number of characters to the stream.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be written.</param>
/// <param name="count">The number of characters to write.</param>
/// <returns>The number of characters actually written, either 'count' or 0.</returns>
CASABLANCA_DEPRECATED("This API in some cases performs a copy. It is deprecated and will be removed in a future "
"release. Use putn_nocopy instead.")
virtual pplx::task<size_t> putn(const _CharType* ptr, size_t count)
{
if (!can_write()) return create_exception_checked_value_task<size_t>(0);
if (count == 0) return pplx::task_from_result<size_t>(0);
return create_exception_checked_task<size_t>(_putn(ptr, count, true), [](size_t) {
return false; // no EOF for write
});
}
/// <summary>
/// Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until
/// the returned task completes.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be written.</param>
/// <param name="count">The number of characters to write.</param>
/// <returns>A <c>task</c> that holds the number of characters actually written, either 'count' or 0.</returns>
virtual pplx::task<size_t> putn_nocopy(const _CharType* ptr, size_t count)
{
if (!can_write()) return create_exception_checked_value_task<size_t>(0);
if (count == 0) return pplx::task_from_result<size_t>(0);
return create_exception_checked_task<size_t>(_putn(ptr, count), [](size_t) {
return false; // no EOF for write
});
}
/// <summary>
/// Reads a single character from the stream and advances the read position.
/// </summary>
/// <returns>The value of the character. EOF if the read fails.</returns>
virtual pplx::task<int_type> bumpc()
{
if (!can_read())
return create_exception_checked_value_task<int_type>(streambuf_state_manager<_CharType>::traits::eof());
return create_exception_checked_task<int_type>(
_bumpc(), [](int_type val) { return val == streambuf_state_manager<_CharType>::traits::eof(); });
}
/// <summary>
/// Reads a single character from the stream and advances the read position.
/// </summary>
/// <returns>The value of the character. <c>-1</c> if the read fails. <c>-2</c> if an asynchronous read is
/// required</returns> <remarks>This is a synchronous operation, but is guaranteed to never block.</remarks>
virtual int_type sbumpc()
{
if (!(m_currentException == nullptr)) std::rethrow_exception(m_currentException);
if (!can_read()) return traits::eof();
return check_sync_read_eof(_sbumpc());
}
/// <summary>
/// Reads a single character from the stream without advancing the read position.
/// </summary>
/// <returns>The value of the byte. EOF if the read fails.</returns>
virtual pplx::task<int_type> getc()
{
if (!can_read()) return create_exception_checked_value_task<int_type>(traits::eof());
return create_exception_checked_task<int_type>(
_getc(), [](int_type val) { return val == streambuf_state_manager<_CharType>::traits::eof(); });
}
/// <summary>
/// Reads a single character from the stream without advancing the read position.
/// </summary>
/// <returns>The value of the character. EOF if the read fails. <see cref="::requires_async method" /> if an
/// asynchronous read is required</returns> <remarks>This is a synchronous operation, but is guaranteed to never
/// block.</remarks>
virtual int_type sgetc()
{
if (!(m_currentException == nullptr)) std::rethrow_exception(m_currentException);
if (!can_read()) return traits::eof();
return check_sync_read_eof(_sgetc());
}
/// <summary>
/// Advances the read position, then returns the next character without advancing again.
/// </summary>
/// <returns>The value of the character. EOF if the read fails.</returns>
virtual pplx::task<int_type> nextc()
{
if (!can_read()) return create_exception_checked_value_task<int_type>(traits::eof());
return create_exception_checked_task<int_type>(
_nextc(), [](int_type val) { return val == streambuf_state_manager<_CharType>::traits::eof(); });
}
/// <summary>
/// Retreats the read position, then returns the current character without advancing.
/// </summary>
/// <returns>The value of the character. EOF if the read fails. <see cref="::requires_async method" /> if an
/// asynchronous read is required</returns>
virtual pplx::task<int_type> ungetc()
{
if (!can_read()) return create_exception_checked_value_task<int_type>(traits::eof());
return create_exception_checked_task<int_type>(_ungetc(), [](int_type) { return false; });
}
/// <summary>
/// Reads up to a given number of characters from the stream.
/// </summary>
/// <param name="ptr">The address of the target memory area.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <returns>The number of characters read. O if the end of the stream is reached.</returns>
virtual pplx::task<size_t> getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
if (!can_read()) return create_exception_checked_value_task<size_t>(0);
if (count == 0) return pplx::task_from_result<size_t>(0);
return create_exception_checked_task<size_t>(_getn(ptr, count), [](size_t val) { return val == 0; });
}
/// <summary>
/// Copies up to a given number of characters from the stream, synchronously.
/// </summary>
/// <param name="ptr">The address of the target memory area.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <returns>The number of characters copied. O if the end of the stream is reached or an asynchronous read is
/// required.</returns> <remarks>This is a synchronous operation, but is guaranteed to never block.</remarks>
virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
if (!(m_currentException == nullptr)) std::rethrow_exception(m_currentException);
if (!can_read()) return 0;
return _scopy(ptr, count);
}
/// <summary>
/// For output streams, flush any internally buffered data to the underlying medium.
/// </summary>
/// <returns><c>true</c> if the flush succeeds, <c>false</c> if not</returns>
virtual pplx::task<void> sync()
{
if (!can_write())
{
if (m_currentException == nullptr)
return pplx::task_from_result();
else
return pplx::task_from_exception<void>(m_currentException);
}
return create_exception_checked_task<bool>(_sync(), [](bool) { return false; }).then([](bool) {});
}
/// <summary>
/// Retrieves the stream buffer exception_ptr if it has been set.
/// </summary>
/// <returns>Pointer to the exception, if it has been set; otherwise, <c>nullptr</c> will be returned.</returns>
virtual std::exception_ptr exception() const { return m_currentException; }
/// <summary>
/// Allocates a contiguous memory block and returns it.
/// </summary>
/// <param name="count">The number of characters to allocate.</param>
/// <returns>A pointer to a block to write to, null if the stream buffer implementation does not support
/// alloc/commit.</returns> <remarks>This is intended as an advanced API to be used only when it is important to
/// avoid extra copies.</remarks>
_CharType* alloc(size_t count)
{
if (m_alloced)
throw std::logic_error(
"The buffer is already allocated, this maybe caused by overlap of stream read or write");
_CharType* alloc_result = _alloc(count);
if (alloc_result) m_alloced = true;
return alloc_result;
}
/// <summary>
/// Submits a block already allocated by the stream buffer.
/// </summary>
/// <param name="count">The number of characters to be committed.</param>
/// <remarks>This is intended as an advanced API to be used only when it is important to avoid extra
/// copies.</remarks>
void commit(size_t count)
{
if (!m_alloced) throw std::logic_error("The buffer needs to allocate first");
_commit(count);
m_alloced = false;
}
public:
virtual bool can_seek() const = 0;
virtual bool has_size() const = 0;
virtual utility::size64_t size() const { return 0; }
virtual size_t buffer_size(std::ios_base::openmode direction = std::ios_base::in) const = 0;
virtual void set_buffer_size(size_t size, std::ios_base::openmode direction = std::ios_base::in) = 0;
virtual size_t in_avail() const = 0;
virtual pos_type getpos(std::ios_base::openmode direction) const = 0;
virtual pos_type seekpos(pos_type pos, std::ios_base::openmode direction) = 0;
virtual pos_type seekoff(off_type offset, std::ios_base::seekdir way, std::ios_base::openmode mode) = 0;
virtual bool acquire(_Out_writes_(count) _CharType*& ptr, _In_ size_t& count) = 0;
virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
protected:
virtual pplx::task<int_type> _putc(_CharType ch) = 0;
// This API is only needed for file streams and until we remove the deprecated stream buffer putn overload.
virtual pplx::task<size_t> _putn(const _CharType* ptr, size_t count, bool)
{
// Default to no copy, only the file streams API overloads and performs a copy.
return _putn(ptr, count);
}
virtual pplx::task<size_t> _putn(const _CharType* ptr, size_t count) = 0;
virtual pplx::task<int_type> _bumpc() = 0;
virtual int_type _sbumpc() = 0;
virtual pplx::task<int_type> _getc() = 0;
virtual int_type _sgetc() = 0;
virtual pplx::task<int_type> _nextc() = 0;
virtual pplx::task<int_type> _ungetc() = 0;
virtual pplx::task<size_t> _getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
virtual size_t _scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count) = 0;
virtual pplx::task<bool> _sync() = 0;
virtual _CharType* _alloc(size_t count) = 0;
virtual void _commit(size_t count) = 0;
/// <summary>
/// The real read head close operation, implementation should override it if there is any resource to be released.
/// </summary>
virtual pplx::task<void> _close_read()
{
m_stream_can_read = false;
return pplx::task_from_result();
}
/// <summary>
/// The real write head close operation, implementation should override it if there is any resource to be released.
/// </summary>
virtual pplx::task<void> _close_write()
{
m_stream_can_write = false;
return pplx::task_from_result();
}
protected:
streambuf_state_manager(std::ios_base::openmode mode)
{
m_stream_can_read = (mode & std::ios_base::in) != 0;
m_stream_can_write = (mode & std::ios_base::out) != 0;
m_stream_read_eof = false;
m_alloced = false;
}
std::exception_ptr m_currentException;
// The in/out mode for the buffer
std::atomic<bool> m_stream_can_read;
std::atomic<bool> m_stream_can_write;
std::atomic<bool> m_stream_read_eof;
std::atomic<bool> m_alloced;
private:
template<typename _CharType1>
pplx::task<_CharType1> create_exception_checked_value_task(const _CharType1& val) const
{
if (this->exception() == nullptr)
return pplx::task_from_result<_CharType1>(static_cast<_CharType1>(val));
else
return pplx::task_from_exception<_CharType1>(this->exception());
}
// Set exception and eof states for async read
template<typename _CharType1>
pplx::task<_CharType1> create_exception_checked_task(pplx::task<_CharType1> result,
std::function<bool(_CharType1)> eof_test,
std::ios_base::openmode mode = std::ios_base::in |
std::ios_base::out)
{
auto thisPointer = this->shared_from_this();
auto func1 = [=](pplx::task<_CharType1> t1) -> pplx::task<_CharType1> {
try
{
thisPointer->m_stream_read_eof = eof_test(t1.get());
}
catch (...)
{
thisPointer->close(mode, std::current_exception()).get();
return pplx::task_from_exception<_CharType1>(thisPointer->exception(), pplx::task_options());
}
if (thisPointer->m_stream_read_eof && !(thisPointer->exception() == nullptr))
return pplx::task_from_exception<_CharType1>(thisPointer->exception(), pplx::task_options());
return t1;
};
if (result.is_done())
{
// If the data is already available, we should avoid scheduling a continuation, so we do it inline.
return func1(result);
}
else
{
return result.then(func1);
}
}
// Set eof states for sync read
int_type check_sync_read_eof(int_type ch)
{
m_stream_read_eof = ch == traits::eof();
return ch;
}
};
} // namespace details
// Forward declarations
template<typename _CharType>
class basic_istream;
template<typename _CharType>
class basic_ostream;
/// <summary>
/// Reference-counted stream buffer.
/// </summary>
/// <typeparam name="_CharType">
/// The data type of the basic element of the <c>streambuf.</c>
/// </typeparam>
/// <typeparam name="_CharType2">
/// The data type of the basic element of the <c>streambuf.</c>
/// </typeparam>
template<typename _CharType>
class streambuf : public details::basic_streambuf<_CharType>
{
public:
typedef typename details::basic_streambuf<_CharType>::traits traits;
typedef typename details::basic_streambuf<_CharType>::int_type int_type;
typedef typename details::basic_streambuf<_CharType>::pos_type pos_type;
typedef typename details::basic_streambuf<_CharType>::off_type off_type;
typedef typename details::basic_streambuf<_CharType>::char_type char_type;
template<typename _CharType2>
friend class streambuf;
/// <summary>
/// Constructor.
/// </summary>
/// <param name="ptr">A pointer to the concrete stream buffer implementation.</param>
streambuf(_In_ const std::shared_ptr<details::basic_streambuf<_CharType>>& ptr) : m_buffer(ptr) {}
/// <summary>
/// Default constructor.
/// </summary>
streambuf() {}
/// <summary>
/// Converter Constructor.
/// </summary>
/// <typeparam name="AlterCharType">
/// The data type of the basic element of the source <c>streambuf</c>.
/// </typeparam>
/// <param name="other">The source buffer to be converted.</param>
template<typename AlterCharType>
streambuf(const streambuf<AlterCharType>& other)
: m_buffer(std::static_pointer_cast<details::basic_streambuf<_CharType>>(
std::static_pointer_cast<void>(other.m_buffer)))
{
static_assert(std::is_same<pos_type, typename details::basic_streambuf<AlterCharType>::pos_type>::value &&
std::is_same<off_type, typename details::basic_streambuf<AlterCharType>::off_type>::value &&
std::is_integral<_CharType>::value && std::is_integral<AlterCharType>::value &&
std::is_integral<int_type>::value &&
std::is_integral<typename details::basic_streambuf<AlterCharType>::int_type>::value &&
sizeof(_CharType) == sizeof(AlterCharType) &&
sizeof(int_type) == sizeof(typename details::basic_streambuf<AlterCharType>::int_type),
"incompatible stream character types");
}
/// <summary>
/// Constructs an input stream head for this stream buffer.
/// </summary>
/// <returns><c>basic_istream</c>.</returns>
concurrency::streams::basic_istream<_CharType> create_istream() const
{
if (!can_read()) throw std::runtime_error("stream buffer not set up for input of data");
return concurrency::streams::basic_istream<_CharType>(*this);
}
/// <summary>
/// Constructs an output stream for this stream buffer.
/// </summary>
/// <returns>basic_ostream</returns>
concurrency::streams::basic_ostream<_CharType> create_ostream() const
{
if (!can_write()) throw std::runtime_error("stream buffer not set up for output of data");
return concurrency::streams::basic_ostream<_CharType>(*this);
}
/// <summary>
/// Checks if the stream buffer has been initialized or not.
/// </summary>
operator bool() const { return (bool)m_buffer; }
/// <summary>
/// Destructor
/// </summary>
virtual ~streambuf() {}
const std::shared_ptr<details::basic_streambuf<_CharType>>& get_base() const
{
if (!m_buffer)
{
throw std::invalid_argument("Invalid streambuf object");
}
return m_buffer;
}
/// <summary>
/// <c>can_read</c> is used to determine whether a stream buffer will support read operations (get).
/// </summary>
virtual bool can_read() const { return get_base()->can_read(); }
/// <summary>
/// <c>can_write</c> is used to determine whether a stream buffer will support write operations (put).
/// </summary>
virtual bool can_write() const { return get_base()->can_write(); }
/// <summary>
/// <c>can_seek</c> is used to determine whether a stream buffer supports seeking.
/// </summary>
/// <returns>True if seeking is supported, false otherwise.</returns>
virtual bool can_seek() const { return get_base()->can_seek(); }
/// <summary>
/// <c>has_size</c> is used to determine whether a stream buffer supports size().
/// </summary>
/// <returns>True if the <c>size</c> API is supported, false otherwise.</returns>
virtual bool has_size() const { return get_base()->has_size(); }
/// <summary>
/// Gets the total number of characters in the stream buffer, if known. Calls to <c>has_size</c> will determine
/// whether the result of <c>size</c> can be relied on.
/// </summary>
/// <returns>The total number of characters in the stream buffer.</returns>
virtual utility::size64_t size() const { return get_base()->size(); }
/// <summary>
/// Gets the stream buffer size, if one has been set.
/// </summary>
/// <param name="direction">The direction of buffering (in or out)</param>
/// <returns>The size of the internal buffer (for the given direction).</returns>
/// <remarks>An implementation that does not support buffering will always return 0.</remarks>
virtual size_t buffer_size(std::ios_base::openmode direction = std::ios_base::in) const
{
return get_base()->buffer_size(direction);
}
/// <summary>
/// Sets the stream buffer implementation to buffer or not buffer.
/// </summary>
/// <param name="size">The size to use for internal buffering, 0 if no buffering should be done.</param>
/// <param name="direction">The direction of buffering (in or out)</param>
/// <remarks>An implementation that does not support buffering will silently ignore calls to this function and it
/// will not have any effect on what is returned by subsequent calls to <see cref="::buffer_size method"
/// />.</remarks>
virtual void set_buffer_size(size_t size, std::ios_base::openmode direction = std::ios_base::in)
{
get_base()->set_buffer_size(size, direction);
}
/// <summary>
/// For any input stream, <c>in_avail</c> returns the number of characters that are immediately available
/// to be consumed without blocking. May be used in conjunction with <cref="::sbumpc method"/> to read data without
/// incurring the overhead of using tasks.
/// </summary>
/// <returns>Number of characters that are ready to read.</returns>
virtual size_t in_avail() const { return get_base()->in_avail(); }
/// <summary>
/// Checks if the stream buffer is open.
/// </summary>
/// <remarks>No separation is made between open for reading and open for writing.</remarks>
/// <returns>True if the stream buffer is open for reading or writing, false otherwise.</returns>
virtual bool is_open() const { return get_base()->is_open(); }
/// <summary>
/// <c>is_eof</c> is used to determine whether a read head has reached the end of the buffer.
/// </summary>
/// <returns>True if at the end of the buffer, false otherwise.</returns>
virtual bool is_eof() const { return get_base()->is_eof(); }
/// <summary>
/// Closes the stream buffer, preventing further read or write operations.
/// </summary>
/// <param name="mode">The I/O mode (in or out) to close for.</param>
virtual pplx::task<void> close(std::ios_base::openmode mode = (std::ios_base::in | std::ios_base::out))
{
// We preserve the check here to workaround a Dev10 compiler crash
auto buffer = get_base();
return buffer ? buffer->close(mode) : pplx::task_from_result();
}
/// <summary>
/// Closes the stream buffer with an exception.
/// </summary>
/// <param name="mode">The I/O mode (in or out) to close for.</param>
/// <param name="eptr">Pointer to the exception.</param>
virtual pplx::task<void> close(std::ios_base::openmode mode, std::exception_ptr eptr)
{
// We preserve the check here to workaround a Dev10 compiler crash
auto buffer = get_base();
return buffer ? buffer->close(mode, eptr) : pplx::task_from_result();
}
/// <summary>
/// Writes a single character to the stream.
/// </summary>
/// <param name="ch">The character to write</param>
/// <returns>The value of the character. EOF if the write operation fails</returns>
virtual pplx::task<int_type> putc(_CharType ch) { return get_base()->putc(ch); }
/// <summary>
/// Allocates a contiguous memory block and returns it.
/// </summary>
/// <param name="count">The number of characters to allocate.</param>
/// <returns>A pointer to a block to write to, null if the stream buffer implementation does not support
/// alloc/commit.</returns>
virtual _CharType* alloc(size_t count) { return get_base()->alloc(count); }
/// <summary>
/// Submits a block already allocated by the stream buffer.
/// </summary>
/// <param name="count">The number of characters to be committed.</param>
virtual void commit(size_t count) { get_base()->commit(count); }
/// <summary>
/// Gets a pointer to the next already allocated contiguous block of data.
/// </summary>
/// <param name="ptr">A reference to a pointer variable that will hold the address of the block on success.</param>
/// <param name="count">The number of contiguous characters available at the address in 'ptr'.</param>
/// <returns><c>true</c> if the operation succeeded, <c>false</c> otherwise.</returns>
/// <remarks>
/// A return of false does not necessarily indicate that a subsequent read operation would fail, only that
/// there is no block to return immediately or that the stream buffer does not support the operation.
/// The stream buffer may not de-allocate the block until <see cref="::release method" /> is called.
/// If the end of the stream is reached, the function will return <c>true</c>, a null pointer, and a count of zero;
/// a subsequent read will not succeed.
/// </remarks>
virtual bool acquire(_Out_ _CharType*& ptr, _Out_ size_t& count)
{
ptr = nullptr;
count = 0;
return get_base()->acquire(ptr, count);
}
/// <summary>
/// Releases a block of data acquired using <see cref="::acquire method"/>. This frees the stream buffer to
/// de-allocate the memory, if it so desires. Move the read position ahead by the count.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be released.</param>
/// <param name="count">The number of characters that were read.</param>
virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t count) { get_base()->release(ptr, count); }
/// <summary>
/// Writes a number of characters to the stream.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be written.</param>
/// <param name="count">The number of characters to write.</param>
/// <returns>The number of characters actually written, either 'count' or 0.</returns>
CASABLANCA_DEPRECATED("This API in some cases performs a copy. It is deprecated and will be removed in a future "
"release. Use putn_nocopy instead.")
virtual pplx::task<size_t> putn(const _CharType* ptr, size_t count) { return get_base()->putn(ptr, count); }
/// <summary>
/// Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until
/// the returned task completes.
/// </summary>
/// <param name="ptr">A pointer to the block of data to be written.</param>
/// <param name="count">The number of characters to write.</param>
/// <returns>The number of characters actually written, either 'count' or 0.</returns>
virtual pplx::task<size_t> putn_nocopy(const _CharType* ptr, size_t count)
{
return get_base()->putn_nocopy(ptr, count);
}
/// <summary>
/// Reads a single character from the stream and advances the read position.
/// </summary>
/// <returns>The value of the character. EOF if the read fails.</returns>
virtual pplx::task<int_type> bumpc() { return get_base()->bumpc(); }
/// <summary>
/// Reads a single character from the stream and advances the read position.
/// </summary>
/// <returns>The value of the character. <c>-1</c> if the read fails. <c>-2</c> if an asynchronous read is
/// required</returns> <remarks>This is a synchronous operation, but is guaranteed to never block.</remarks>
virtual typename details::basic_streambuf<_CharType>::int_type sbumpc() { return get_base()->sbumpc(); }
/// <summary>
/// Reads a single character from the stream without advancing the read position.
/// </summary>
/// <returns>The value of the byte. EOF if the read fails.</returns>
virtual pplx::task<int_type> getc() { return get_base()->getc(); }
/// <summary>
/// Reads a single character from the stream without advancing the read position.
/// </summary>
/// <returns>The value of the character. EOF if the read fails. <see cref="::requires_async method" /> if an
/// asynchronous read is required</returns> <remarks>This is a synchronous operation, but is guaranteed to never
/// block.</remarks>
virtual typename details::basic_streambuf<_CharType>::int_type sgetc() { return get_base()->sgetc(); }
/// <summary>
/// Advances the read position, then returns the next character without advancing again.
/// </summary>
/// <returns>The value of the character. EOF if the read fails.</returns>
pplx::task<int_type> nextc() { return get_base()->nextc(); }
/// <summary>
/// Retreats the read position, then returns the current character without advancing.
/// </summary>
/// <returns>The value of the character. EOF if the read fails. <see cref="::requires_async method" /> if an
/// asynchronous read is required</returns>
pplx::task<int_type> ungetc() { return get_base()->ungetc(); }
/// <summary>
/// Reads up to a given number of characters from the stream.
/// </summary>
/// <param name="ptr">The address of the target memory area.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <returns>The number of characters read. O if the end of the stream is reached.</returns>
virtual pplx::task<size_t> getn(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
return get_base()->getn(ptr, count);
}
/// <summary>
/// Copies up to a given number of characters from the stream, synchronously.
/// </summary>
/// <param name="ptr">The address of the target memory area.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <returns>The number of characters copied. O if the end of the stream is reached or an asynchronous read is
/// required.</returns> <remarks>This is a synchronous operation, but is guaranteed to never block.</remarks>
virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
{
return get_base()->scopy(ptr, count);
}
/// <summary>
/// Gets the current read or write position in the stream.
/// </summary>
/// <param name="direction">The I/O direction to seek (see remarks)</param>
/// <returns>The current position. EOF if the operation fails.</returns>
/// <remarks>Some streams may have separate write and read cursors.
/// For such streams, the direction parameter defines whether to move the read or the write
/// cursor.</remarks>
virtual typename details::basic_streambuf<_CharType>::pos_type getpos(std::ios_base::openmode direction) const
{
return get_base()->getpos(direction);
}
/// <summary>
/// Seeks to the given position.
/// </summary>
/// <param name="pos">The offset from the beginning of the stream.</param>
/// <param name="direction">The I/O direction to seek (see remarks).</param>
/// <returns>The position. EOF if the operation fails.</returns>
/// <remarks>Some streams may have separate write and read cursors. For such streams, the direction parameter
/// defines whether to move the read or the write cursor.</remarks>
virtual typename details::basic_streambuf<_CharType>::pos_type seekpos(
typename details::basic_streambuf<_CharType>::pos_type pos, std::ios_base::openmode direction)
{
return get_base()->seekpos(pos, direction);
}
/// <summary>
/// Seeks to a position given by a relative offset.
/// </summary>
/// <param name="offset">The relative position to seek to</param>
/// <param name="way">The starting point (beginning, end, current) for the seek.</param>
/// <param name="mode">The I/O direction to seek (see remarks)</param>
/// <returns>The position. EOF if the operation fails.</returns>
/// <remarks>Some streams may have separate write and read cursors.
/// For such streams, the mode parameter defines whether to move the read or the write cursor.</remarks>
virtual typename details::basic_streambuf<_CharType>::pos_type seekoff(
typename details::basic_streambuf<_CharType>::off_type offset,
std::ios_base::seekdir way,
std::ios_base::openmode mode)
{
return get_base()->seekoff(offset, way, mode);
}
/// <summary>
/// For output streams, flush any internally buffered data to the underlying medium.
/// </summary>
/// <returns><c>true</c> if the flush succeeds, <c>false</c> if not</returns>
virtual pplx::task<void> sync() { return get_base()->sync(); }
/// <summary>
/// Retrieves the stream buffer exception_ptr if it has been set.
/// </summary>
/// <returns>Pointer to the exception, if it has been set; otherwise, <c>nullptr</c> will be returned</returns>
virtual std::exception_ptr exception() const { return get_base()->exception(); }
private:
std::shared_ptr<details::basic_streambuf<_CharType>> m_buffer;
};
} // namespace streams
} // namespace Concurrency
================================================
FILE: Release/include/cpprest/asyncrt_utils.h
================================================
/***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* Various common utilities.
*
* For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
#pragma once
#include "cpprest/details/basic_types.h"
#include "pplx/pplxtasks.h"
#include <chrono>
#include <cstdint>
#include <limits.h>
#include <locale.h>
#include <random>
#include <string>
#include <system_error>
#include <vector>
#ifndef _WIN32
#include <sys/time.h>
#if !defined(ANDROID) && !defined(__ANDROID__) && defined(HAVE_XLOCALE_H) // CodePlex 269
/* Systems using glibc: xlocale.h has been removed from glibc 2.26
The above include of locale.h is sufficient
Further details: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336db7492e47d2e8e72eb8af53b5506d */
#include <xlocale.h>
#endif
#endif
/// Various utilities for string conversions and date and time manipulation.
namespace utility
{
// Left over from VS2010 support, remains to avoid breaking.
typedef std::chrono::seconds seconds;
/// Functions for converting to/from std::chrono::seconds to xml string.
namespace timespan
{
/// <summary>
/// Converts a timespan/interval in seconds to xml duration string as specified by
/// http://www.w3.org/TR/xmlschema-2/#duration
/// </summary>
_ASYNCRTIMP utility::string_t __cdecl seconds_to_xml_duration(utility::seconds numSecs);
/// <summary>
/// Converts an xml duration to timespan/interval in seconds
/// http://www.w3.org/TR/xmlschema-2/#duration
/// </summary>
_ASYNCRTIMP utility::seconds __cdecl xml_duration_to_seconds(const utility::string_t& timespanString);
} // namespace timespan
/// Functions for Unicode string conversions.
namespace conversions
{
/// <summary>
/// Converts a UTF-16 string to a UTF-8 string.
/// </summary>
/// <param name="w">A two byte character UTF-16 string.</param>
/// <returns>A single byte character UTF-8 string.</returns>
_ASYNCRTIMP std::string __cdecl utf16_to_utf8(const utf16string& w);
/// <summary>
/// Converts a UTF-8 string to a UTF-16
/// </summary>
/// <param name="s">A single byte character UTF-8 string.</param>
/// <returns>A two byte character UTF-16 string.</returns>
_ASYNCRTIMP utf16string __cdecl utf8_to_utf16(const std::string& s);
/// <summary>
/// Converts a ASCII (us-ascii) string to a UTF-16 string.
/// </summary>
/// <param name="s">A single byte character us-ascii string.</param>
/// <returns>A two byte character UTF-16 string.</returns>
_ASYNCRTIMP utf16string __cdecl usascii_to_utf16(const std::string& s);
/// <summary>
/// Converts a Latin1 (iso-8859-1) string to a UTF-16 string.
/// </summary>
/// <param name="s">A single byte character UTF-8 string.</param>
/// <returns>A two byte character UTF-16 string.</returns>
_ASYNCRTIMP utf16string __cdecl latin1_to_utf16(const std::string& s);
/// <summary>
/// Converts a Latin1 (iso-8859-1) string to a UTF-8 string.
/// </summary>
/// <param name="s">A single byte character UTF-8 string.</param>
/// <returns>A single byte character UTF-8 string.</returns>
_ASYNCRTIMP utf8string __cdecl latin1_to_utf8(const std::string& s);
/// <summary>
/// Converts to a platform dependent Unicode string type.
/// </summary>
/// <param name="s">A single byte character UTF-8 string.</param>
/// <returns>A platform dependent string type.</returns>
#ifdef _UTF16_STRINGS
_ASYNCRTIMP utility::string_t __cdecl to_string_t(std::string&& s);
#else
inline utility::string_t&& to_string_t(std::string&& s) { return std::move(s); }
#endif
/// <summary>
/// Converts to a platform dependent Unicode string type.
/// </summary>
/// <param name="s">A two byte character UTF-16 string.</param>
/// <returns>A platform dependent string type.</returns>
#ifdef _UTF16_STRINGS
inline utility::string_t&& to_string_t(utf16string&& s) { return std::move(s); }
#else
_ASYNCRTIMP utility::string_t __cdecl to_string_t(utf16string&& s);
#endif
/// <summary>
/// Converts to a platform dependent Unicode string type.
/// </summary>
/// <param name="s">A single byte character UTF-8 string.</param>
/// <returns>A platform dependent string type.</returns>
#ifdef _UTF16_STRINGS
_ASYNCRTIMP utility::string_t __cdecl to_string_t(const std::string& s);
#else
inline const utility::string_t& to_string_t(const std::string& s) { return s; }
#endif
/// <summary>
/// Converts to a platform dependent Unicode string type.
/// </summary>
/// <param name="s">A two byte character UTF-16 string.</param>
/// <returns>A platform dependent string type.</returns>
#ifdef _UTF16_STRINGS
inline const utility::string_t& to_string_t(const utf16string& s) { return s; }
#else
_ASYNCRTIMP utility::string_t __cdecl to_string_t(const utf16string& s);
#endif
/// <summary>
/// Converts to a UTF-16 from string.
/// </summary>
/// <param name="value">A single byte character UTF-8 string.</param>
/// <returns>A two byte character UTF-16 string.</returns>
_ASYNCRTIMP utf16string __cdecl to_utf16string(const std::string& value);
/// <summary>
/// Converts to a UTF-16 from string.
/// </summary>
/// <param name="value">A two byte character UTF-16 string.</param>
/// <returns>A two byte character UTF-16 string.</returns>
inline const utf16string& to_utf16string(const utf16string& value) { return value; }
/// <summary>
/// Converts to a UTF-16 from string.
/// </summary>
/// <param name="value">A two byte character UTF-16 string.</param>
/// <returns>A two byte character UTF-16 string.</returns>
inline utf16string&& to_utf16string(utf16string&& value) { return std::move(value); }
/// <summary>
/// Converts to a UTF-8 string.
/// </summary>
/// <param name="value">A single byte character UTF-8 string.</param>
/// <returns>A single byte character UTF-8 string.</returns>
inline std::string&& to_utf8string(std::string&& value) { return std::move(value); }
/// <summary>
/// Converts to a UTF-8 string.
/// </summary>
/// <param name="value">A single byte character UTF-8 string.</param>
/// <returns>A single byte character UTF-8 string.</returns>
inline const std::string& to_utf8string(const std::string& value) { return value; }
/// <summary>
/// Converts to a UTF-8 string.
/// </summary>
/// <param name="value">A two byte character UTF-16 string.</param>
/// <returns>A single byte character UTF-8 string.</returns>
_ASYNCRTIMP std::string __cdecl to_utf8string(const utf16string& value);
/// <summary>
/// Encode the given byte array into a base64 string
/// </summary>
_ASYNCRTIMP utility::string_t __cdecl to_base64(const std::vector<unsigned char>& data);
/// <summary>
/// Encode the given 8-byte integer into a base64 string
/// </summary>
_ASYNCRTIMP utility::string_t __cdecl to_base64(uint64_t data);
/// <summary>
/// Decode the given base64 string to a byte array
/// </summary>
_ASYNCRTIMP std::vector<unsigned char> __cdecl from_base64(const utility::string_t& str);
template<typename Source>
CASABLANCA_DEPRECATED("All locale-sensitive APIs will be removed in a future update. Use stringstreams directly if "
"locale support is required.")
utility::string_t print_string(const Source& val, const std::locale& loc = std::locale())
{
utility::ostringstream_t oss;
oss.imbue(loc);
oss << val;
if (oss.bad())
{
throw std::bad_cast();
}
return oss.str();
}
CASABLANCA_DEPRECATED("All locale-sensitive APIs will be removed in a future update. Use stringstreams directly if "
"locale support is required.")
inline utility::string_t print_string(const utility::string_t& val) { return val; }
namespace details
{
#if defined(__ANDROID__)
template<class T>
inline std::string to_string(const T t)
{
std::ostringstream os;
os.imbue(std::locale::classic());
os << t;
return os.str();
}
#endif
template<class T>
inline utility::string_t to_string_t(const T t)
{
#ifdef _UTF16_STRINGS
using std::to_wstring;
return to_wstring(t);
#else
#if !defined(__ANDROID__)
using std::to_string;
#endif
return to_string(t);
#endif
}
template<typename Source>
utility::string_t print_string(const Source& val)
{
utility::ostringstream_t oss;
oss.imbue(std::locale::classic());
oss << val;
if (oss.bad())
{
throw std::bad_cast();
}
return oss.str();
}
inline const utility::string_t& print_string(const utility::string_t& val) { return val; }
template<typename Source>
utf8string print_utf8string(const Source& val)
{
return conversions::to_utf8string(print_string(val));
}
inline const utf8string& print_utf8string(const utf8string& val) { return val; }
template<typename Target>
Target scan_string(const utility::string_t& str)
{
Target t;
utility::istringstream_t iss(str);
iss.imbue(std::locale::classic());
iss >> t;
if (iss.bad())
{
throw std::bad_cast();
}
return t;
}
inline const utility::string_t& scan_string(const utility::string_t& str) { return str; }
} // namespace details
template<typename Target>
CASABLANCA_DEPRECATED("All locale-sensitive APIs will be removed in a future update. Use stringstreams directly if "
"locale support is required.")
Target scan_string(const utility::string_t& str, const std::locale& loc = std::locale())
{
Target t;
utility::istringstream_t iss(str);
iss.imbue(loc);
iss >> t;
if (iss.bad())
{
throw std::bad_cast();
}
return t;
}
CASABLANCA_DEPRECATED("All locale-sensitive APIs will be removed in a future update. Use stringstreams directly if "
"locale support is required.")
inline utility::string_t scan_string(const utility::string_t& str) { return str; }
} // namespace conversions
namespace details
{
/// <summary>
/// Cross platform RAII container for setting thread local locale.
/// </summary>
class scoped_c_thread_locale
{
public:
_ASYNCRTIMP scoped_c_thread_locale();
_ASYNCRTIMP ~scoped_c_thread_locale();
#if !defined(ANDROID) && !defined(__ANDROID__) // CodePlex 269
#ifdef _WIN32
typedef _locale_t xplat_locale;
#else
typedef locale_t xplat_locale;
#endif
static _ASYNCRTIMP xplat_locale __cdecl c_locale();
#endif
private:
#ifdef _WIN32
std::string m_prevLocale;
int m_prevThreadSetting;
#elif !(defined(ANDROID) || defined(__ANDROID__))
locale_t m_prevLocale;
#endif
scoped_c_thread_locale(const scoped_c_thread_locale&);
scoped_c_thread_locale& operator=(const scoped_c_thread_locale&);
};
/// <summary>
/// Our own implementation of alpha numeric instead of std::isalnum to avoid
/// taking global lock for performance reasons.
/// </summary>
inline bool __cdecl is_alnum(const unsigned char uch) CPPREST_NOEXCEPT
{ // test if uch is an alnum character
// special casing char to avoid branches
// clang-format off
static CPPREST_CONSTEXPR bool is_alnum_table[UCHAR_MAX + 1] = {
/* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */
/* 0X */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 1X */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 2X */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 3X */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 0-9 */
/* 4X */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* A-Z */
/* 5X */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
/* 6X */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* a-z */
/* 7X */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
/* non-ASCII values initialized to 0 */
};
// clang-format on
return (is_alnum_table[uch]);
}
/// <summary>
/// Our own implementation of alpha numeric instead of std::isalnum to avoid
/// taking global lock for performance reasons.
/// </summary>
inline bool __cdecl is_alnum(const char ch) CPPREST_NOEXCEPT { return (is_alnum(static_cast<unsigned char>(ch))); }
/// <summary>
/// Our own implementation of alpha numeric instead of std::isalnum to avoid
/// taking global lock for performance reasons.
/// </summary>
template<class Elem>
inline bool __cdecl is_alnum(Elem ch) CPPREST_NOEXCEPT
{
// assumes 'x' == L'x' for the ASCII range
typedef typename std::make_unsigned<Elem>::type UElem;
const auto uch = static_cast<UElem>(ch);
return (uch <= static_cast<UElem>('z') && is_alnum(static_cast<unsigned char>(uch)));
}
/// <summary>
/// Our own implementation of whitespace test instead of std::isspace to avoid
/// taking global lock for performance reasons.
/// The following characters are considered whitespace:
/// 0x09 == Horizontal Tab
/// 0x0A == Line Feed
/// 0x0B == Vertical Tab
/// 0x0C == Form Feed
/// 0x0D == Carrage Return
/// 0x20 == Space
/// </summary>
template<class Elem>
inline bool __cdecl is_space(Elem ch) CPPREST_NOEXCEPT
{
// assumes 'x' == L'x' for the ASCII range
typedef typename std::make_unsigned<Elem>::type UElem;
const auto uch = static_cast<UElem>(ch);
return uch == 0x20u || (uch >= 0x09u && uch <= 0x0Du);
}
/// <summary>
/// Simplistic implementation of make_unique. A better implementation would be based on variadic templates
/// and therefore not be compatible with Dev10.
/// </summary>
template<typename _Type>
std::unique_ptr<_Type> make_unique()
{
return std::unique_ptr<_Type>(new _Type());
}
template<typename _Type, typename _Arg1>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1)
{
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1)));
}
template<typename _Type, typename _Arg1, typename _Arg2>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2)
{
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2)));
}
template<typename _Type, typename _Arg1, typename _Arg2, typename _Arg3>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2, _Arg3&& arg3)
{
return std::unique_ptr<_Type>(
new _Type(std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2), std::forward<_Arg3>(arg3)));
}
template<typename _Type, typename _Arg1, typename _Arg2, typename _Arg3, typename _Arg4>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2, _Arg3&& arg3, _Arg4&& arg4)
{
return std::unique_ptr<_Type>(new _Type(
std::forward<_Arg1>(arg1), std::forward<_Arg2>(arg2), std::forward<_Arg3>(arg3), std::forward<_Arg4>(arg4)));
}
template<typename _Type, typename _Arg1, typename _Arg2, typename _Arg3, typename _Arg4, typename _Arg5>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2, _Arg3&& arg3, _Arg4&& arg4, _Arg5&& arg5)
{
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1),
std::forward<_Arg2>(arg2),
std::forward<_Arg3>(arg3),
std::forward<_Arg4>(arg4),
std::forward<_Arg5>(arg5)));
}
template<typename _Type, typename _Arg1, typename _Arg2, typename _Arg3, typename _Arg4, typename _Arg5, typename _Arg6>
std::unique_ptr<_Type> make_unique(_Arg1&& arg1, _Arg2&& arg2, _Arg3&& arg3, _Arg4&& arg4, _Arg5&& arg5, _Arg6&& arg6)
{
return std::unique_ptr<_Type>(new _Type(std::forward<_Arg1>(arg1),
std::forward<_Arg2>(arg2),
std::forward<_Arg3>(arg3),
std::forward<_Arg4>(arg4),
std::forward<_Arg5>(arg5),
std::forward<_Arg6>(arg6)));
}
/// <summary>
/// Cross platform utility function for performing case insensitive string equality comparison.
/// </summary>
/// <param name="left">First string to compare.</param>
/// <param name="right">Second strong to compare.</param>
/// <returns>true if the strings are equivalent, false otherwise</returns>
_ASYNCRTIMP bool __cdecl str_iequal(const std::string& left, const std::string& right) CPPREST_NOEXCEPT;
/// <summary>
/// Cross platform utility function for performing case insensitive string equality comparison.
/// </summary>
/// <param name="left">First string to compare.</param>
/// <param name="right">Second strong to compare.</param>
/// <returns>true if the strings are equivalent, false otherwise</returns>
_ASYNCRTIMP bool __cdecl str_iequal(const std::wstring& left, const std::wstring& right) CPPREST_NOEXCEPT;
/// <summary>
/// Cross platform utility function for performing case insensitive string less-than comparison.
/// </summary>
/// <param name="left">First string to compare.</param>
/// <param name="right">Second strong to compare.</param>
/// <returns>true if a lowercase view of left is lexicographically less than a lowercase view of right; otherwise,
/// false.</returns>
_ASYNCRTIMP bool __cdecl str_iless(const std::string& left, const std::string& right) CPPREST_NOEXCEPT;
/// <summary>
/// Cross platform utility function for performing case insensitive string less-than comparison.
/// </summary>
/// <param name="left">First string to compare.</param>
/// <param name="right">Second strong to compare.</param>
/// <returns>true if a lowercase view of left is lexicographically less than a lowercase view of right; otherwise,
/// false.</returns>
_ASYNCRTIMP bool __cdecl str_iless(const std::wstring& left, const std::wstring& right) CPPREST_NOEXCEPT;
/// <summary>
/// Convert a string to lowercase in place.
/// </summary>
/// <param name="target">The string to convert to lowercase.</param>
_ASYNCRTIMP void __cdecl inplace_tolower(std::string& target) CPPREST_NOEXCEPT;
/// <summary>
/// Convert a string to lowercase in place.
/// </summary>
/// <param name="target">The string to convert to lowercase.</param>
_ASYNCRTIMP void __cdecl inplace_tolower(std::wstring& target) CPPREST_NOEXCEPT;
#ifdef _WIN32
/// <summary>
/// Category error type for Windows OS errors.
/// </summary>
class windows_category_impl : public std::error_category
{
public:
virtual const char* name() const CPPREST_NOEXCEPT { return "windows"; }
virtual std::string message(int errorCode) const CPPREST_NOEXCEPT;
virtual std::error_condition default_error_condition(int errorCode) const CPPREST_NOEXCEPT;
};
/// <summary>
/// Gets the one global instance of the windows error category.
/// </summary>
/// </returns>An error category instance.</returns>
_ASYNCRTIMP const std::error_category& __cdecl windows_category();
#else
/// <summary>
/// Gets the one global instance of the linux error category.
/// </summary>
/// </returns>An error category instance.</returns>
_ASYNCRTIMP const std::error_category& __cdecl linux_category();
#endif
/// <summary>
/// Gets the one global instance of the current platform's error category.
/// </summary>
_ASYNCRTIMP const std::error_category& __cdecl platform_category();
/// <summary>
/// Creates an instance of std::system_error from a OS error code.
/// </summary>
inline std::system_error __cdecl create_system_error(unsigned long errorCode)
{
std::error_code code((int)errorCode, platform_category());
return std::system_error(code, code.message());
}
/// <summary>
/// Creates a std::error_code from a OS error code.
/// </summary>
inline std::error_code __cdecl create_error_code(unsigned long errorCode)
{
return std::error_code((int)errorCode, platform_category());
}
/// <summary>
/// Creates the corresponding error message from a OS error code.
/// </summary>
inline utility::string_t __cdecl create_error_message(unsigned long errorCode)
{
return utility::conversions::to_string_t(create_error_code(errorCode).message());
}
} // namespace details
class datetime
{
public:
typedef uint64_t interval_type;
/// <summary>
/// Defines the supported date and time string formats.
/// </summary>
enum date_format
{
RFC_1123,
ISO_8601
};
/// <summary>
/// Returns the current UTC time.
/// </summary>
static _ASYNCRTIMP datetime __cdecl utc_now();
/// <summary>
/// An invalid UTC timestamp value.
/// </summary>
enum : interval_type
{
utc_timestamp_invalid = static_cast<interval_type>(-1)
};
/// <summary>
/// Returns seconds since Unix/POSIX time epoch at 01-01-1970 00:00:00.
/// If time is before epoch, utc_timestamp_invalid is returned.
/// </summary>
static interval_type utc_timestamp()
{
const auto seconds = utc_now().to_interval() / _secondTicks;
if (seconds >= 11644473600LL)
{
return seconds - 11644473600LL;
}
else
{
return utc_timestamp_invalid;
}
}
datetime() : m_interval(0) { }
/// <summary>
/// Creates <c>datetime</c> from a string representing time in UTC in RFC 1123 or ISO 8601 format.
/// </summary>
/// <returns>Returns a <c>datetime</c> of zero if not successful.</returns>
static _ASYNCRTIMP datetime __cdecl from_string(const utility::string_t& timestring, date_format format = RFC_1123);
/// <summary>
/// Creates <c>datetime</c> from a string representing time in UTC in RFC 1123 or ISO 8601 format.
/// </summary>
/// <returns>Returns <c>datetime::maximum()</c> if not successful.</returns>
static _ASYNCRTIMP datetime __cdecl from_string_maximum_error(const utility::string_t& timestring,
date_format format = RFC_1123);
/// <summary>
/// Returns a string representation of the <c>datetime</c>.
/// </summary>
_ASYNCRTIMP utility::string_t to_string(date_format format = RFC_1123) const;
/// <summary>
/// Returns the integral time value.
/// </summary>
interval_type to_interval() const { return m_interval; }
static datetime from_interval(interval_type interval) { return datetime(interval); }
datetime operator-(interval_type value) const { return datetime(m_interval - value); }
datetime operator+(interval_type value) const { return datetime(m_interval + value); }
bool operator==(datetime dt) const { return m_interval == dt.m_interval; }
bool operator!=(const datetime& dt) const { return !(*this == dt); }
bool operator>(const datetime& dt) const { return this->m_interval > dt.m_interval; }
bool operator<(const datetime& dt) const { return this->m_interval < dt.m_interval; }
bool operator>=(const datetime& dt) const { return this->m_interval >= dt.m_interval; }
bool operator<=(const datetime& dt) const { return this->m_interval <= dt.m_interval; }
static interval_type from_milliseconds(unsigned int milliseconds) { return milliseconds * _msTicks; }
static interval_type from_seconds(unsigned int seconds) { return seconds * _secondTicks; }
static interval_type from_minutes(unsigned int minutes) { return minutes * _minuteTicks; }
static interval_type from_hours(unsigned int hours) { return hours * _hourTicks; }
static interval_type from_days(unsigned int days) { return days * _dayTicks; }
bool is_initialized() const { return m_interval != 0; }
static datetime maximum() { return datetime(static_cast<interval_type>(-1)); }
private:
friend int operator-(datetime t1, datetime t2);
static const interval_type _msTicks = static_cast<interval_type>(10000);
static const interval_type _secondTicks = 1000 * _msTicks;
static const interval_type _minuteTicks = 60 * _secondTicks;
static const interval_type _hourTicks = 60 * 60 * _secondTicks;
static const interval_type _dayTicks = 24 * 60 * 60 * _secondTicks;
// Private constructor. Use static methods to create an instance.
datetime(interval_type interval) : m_interval(interval) { }
// Storing as hundreds of nanoseconds 10e-7, i.e. 1 here equals 100ns.
interval_type m_interval;
};
inline int operator-(datetime t1, datetime t2)
{
auto diff = (t1.m_interval - t2.m_interval);
// Round it down to seconds
diff /= 10 * 1000 * 1000;
return static_cast<int>(diff);
}
/// <summary>
/// Nonce string generator class.
/// </summary>
class nonce_generator
{
public:
/// <summary>
/// Define default nonce length.
/// </summary>
enum
{
default_length = 32
};
/// <summary>
/// Nonce generator constructor.
/// </summary>
/// <param name="length">Length of the generated nonce string.</param>
nonce_generator(int length = default_length)
: m_random(static_cast<unsigned int>(utility::datetime::utc_timestamp())), m_length(length)
{
}
/// <summary>
/// Generate a nonce string containing random alphanumeric characters (A-Za-z0-9).
/// Length of the generated string is set by length().
/// </summary>
/// <returns>The generated nonce string.</returns>
_ASYNCRTIMP utility::string_t generate();
/// <summary>
/// Get length of generated nonce string.
/// </summary>
/// <returns>Nonce string length.</returns>
int length() const { return m_length; }
/// <summary>
/// Set length of the generated nonce string.
/// </summary>
/// <param name="length">Lenght of nonce string.</param>
void set_length(int length) { m_length = length; }
private:
std::mt19937 m_random;
int m_length;
};
} // namespace utility
================================================
FILE: Release/include/cpprest/base_uri.h
================================================
/***
* Copyright (C) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
*
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* Protocol independent support for URIs.
*
* For the latest on this and related APIs, please see: https://github.com/Microsoft/cpprestsdk
*
* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
****/
#pragma once
#include "cpprest/asyncrt_utils.h"
#include "cpprest/details/basic_types.h"
#include <map>
#include <string>
#include <utility>
#include <vector>
namespace web
{
namespace details
{
struct uri_components
{
uri_components() : m_path(_XPLATSTR("/")), m_port(-1) {}
uri_components(const uri_components&) = default;
uri_components& operator=(const uri_components&) = default;
// This is for VS2013 compatibility -- replace with '= default' when VS2013 is completely dropped.
uri_components(uri_components&& other) CPPREST_NOEXCEPT : m_scheme(std::move(other.m_scheme)),
m_host(std::move(other.m_host)),
m_user_info(std::move(other.m_user_info)),
m_path(std::move(other.m_path)),
m_query(std::move(other.m_query)),
m_fragment(std::move(other.m_fragment)),
m_port(other.m_port)
{
}
// This is for VS2013 compatibility -- replace with '= default' when VS2013 is completely dropped.
uri_components& operator=(uri_components&& other) CPPREST_NOEXCEPT
{
if (this != &other)
{
m_scheme = std::move(other.m_scheme);
m_host = std::move(other.m_host);
m_user_info = std::move(other.m_user_info);
m_path = std::move(other.m_path);
m_query = std::move(other.m_query);
m_fragment = std::move(other.m_fragment);
m_port = other.m_port;
}
return *this;
}
_ASYNCRTIMP utility::string_t join();
utility::string_t m_scheme;
utility::string_t m_host;
utility::string_t m_user_info;
utility::string_t m_path;
utility::string_t m_query;
utility::string_t m_fragment;
int m_port;
};
} // namespace details
/// <summary>
/// A single exception type to represent errors in parsing, encoding, and decoding URIs.
/// </summary>
class uri_exception : public std::exception
{
public:
uri_exception(std::string msg) : m_msg(std::move(msg)) {}
~uri_exception() CPPREST_NOEXCEPT {}
const char* what() const CPPREST_NOEXCEPT { return m_msg.c_str(); }
private:
std::string m_msg;
};
/// <summary>
/// A flexible, protocol independent URI implementation.
///
/// URI instances are immutable. Querying the various fields on an empty URI will return empty strings. Querying
/// various diagnostic members on an empty URI will return false.
/// </summary>
/// <remarks>
/// This implementation accepts both URIs ('http://msn.com/path') and URI relative-references
/// ('/path?query#frag').
///
/// This implementation does not provide any scheme-specific handling -- an example of this
/// would be the following: 'http://path1/path'. This is a valid URI, but it's not a valid
/// http-uri -- that is, it's syntactically correct but does not conform to the requirements
/// of the http scheme (http requires a host).
/// We could provide this by allowing a pluggable 'scheme' policy-class, which would provide
/// extra capability for validating and canonicalizing a URI according to scheme, and would
/// introduce a layer of type-safety for URIs of differing schemes, and thus differing semantics.
///
/// One issue with implementing a scheme-independent URI facility is that of comparing for equality.
/// For instance, these URIs are considered equal 'http://msn.com', 'http://msn.com:80'. That is --
/// the 'default' port can be either omitted or explicit. Since we don't have a way to map a scheme
/// to it's default port, we don't have a way to know these are equal. This is just one of a class of
/// issues with regard to scheme-specific behavior.
/// </remarks>
class uri
{
public:
/// <summary>
/// The various components of a URI. This enum is used to indicate which
/// URI component is being encoded to the encode_uri_component. This allows
/// specific encoding to be performed.
///
/// Scheme and port don't allow '%' so they don't need to be encoded.
/// </summary>
class components
{
public:
enum component
{
user_info,
host,
path,
query,
fragment,
full_uri
};
};
/// <summary>
/// Encodes a URI component according to RFC 3986.
/// Note if a full URI is specified instead of an individual URI component all
/// characters not in the unreserved set are escaped.
/// </summary>
/// <param name="raw">The URI as a string.</param>
/// <returns>The encoded string.</returns>
_ASYNCRTIMP static utility::string_t __cdecl encode_uri(const utility::string_t& raw,
uri::components::component = components::full_uri);
/// <summary>
/// Encodes a string by converting all characters except for RFC 3986 unreserved characters to their
/// hexadecimal representation.
/// </summary>
/// <returns>The encoded string.</returns>
_ASYNCRTIMP static utility::string_t __cdecl encode_data_string(const utility::string_t& data);
/// <summary>
/// Decodes an encoded string.
/// </summary>
/// <param name="encoded">The URI as a string.</param>
/// <returns>The decoded string.</returns>
_ASYNCRTIMP static utility::string_t __cdecl decode(const utility::string_t& encoded);
/// <summary>
/// Splits a path into its hierarchical components.
/// </summary>
/// <param name="path">The path as a string</param>
/// <returns>A <c>std::vector<utility::string_t></c> containing the segments in the path.</returns>
_ASYNCRTIMP static std::vector<utility::string_t> __cdecl split_path(const utility::string_t& path);
/// <summary>
/// Splits a query into its key-value components.
/// </summary>
/// <param name="query">The query string</param>
/// <returns>A <c>std::map<utility::string_t, utility::string_t></c> containing the key-value components of
/// the query.</returns>
_ASYNCRTIMP static std::map<utility::string_t, utility::string_t> __cdecl split_query(
const utility::string_t& query);
/// <summary>
/// Validates a string as a URI.
/// </summary>
/// <remarks>
/// This function accepts both uris ('http://msn.com') and uri relative-references ('path1/path2?query').
/// </remarks>
/// <param name="uri_string">The URI string to be validated.</param>
/// <returns><c>true</c> if the given string represents a valid URI, <c>false</c> otherwise.</returns>
_ASYNCRTIMP static bool __cdecl validate(const utility::string_t& uri_string);
/// <summary>
/// Creates an empty uri
/// </summary>
uri() : m_uri(_XPLATSTR("/")) {}
/// <summary>
/// Creates a URI from the given encoded string. This will throw an exception if the string
/// does not contain a valid URI. Use uri::validate if processing user-input.
/// </summary>
/// <param name="uri_string">A pointer to an encoded string to create the URI instance.</param>
_ASYNCRTIMP uri(const utility::char_t* uri_string);
/// <summary>
/// Creates a URI from the given encoded string. This will throw an exception if the string
/// does not contain a valid URI. Use uri::validate if processing user-input.
/// </summary>
/// <param name="uri_string">An encoded URI string to create the URI instance.</param>
_ASYNCRTIMP uri(const utility::string_t& uri_string);
/// <summary>
/// Copy constructor.
/// </summary>
uri(const uri&) = default;
/// <summary>
/// Copy assignment operator.
/// </summary>
uri& operator=(const uri&) = default;
/// <summary>
/// Move constructor.
/// </summary>
// This is for VS2013 compatibility -- replace with '= default' when VS2013 is completely dropped.
uri(uri&& other) CPPREST_NOEXCEPT : m_uri(std::move(other.m_uri)), m_components(std::move(other.m_components)) {}
/// <summary>
/// Move assignment operator
/// </summary>
// This is for VS2013 compatibility -- replace with '= default' when VS2013 is completely dropped.
uri& operator=(uri&& other) CPPREST_NOEXCEPT
{
if (this != &other)
{
m_uri = std::move(other.m_uri);
m_components = std::move(other.m_components);
}
return *this;
}
/// <summary>
/// Get the scheme component of the URI as an encoded string.
/// </summary>
/// <returns>The URI scheme as a string.</returns>
const utility::string_t& scheme() const { return m_components.m_scheme; }
/// <summary>
/// Get the user information component of the URI as an encoded string.
/// </summary>
/// <returns>The URI user information as a string.</returns>
const utility::string_t& user_info() const { return m_components.m_user_info; }
/// <summary>
/// Get the host component of the URI as an encoded string.
/// </summary>
/// <returns>The URI host as a string.</returns>
const utility::string_t& host() const { return m_components.m_host; }
/// <summary>
/// Get the port component of the URI. Returns -1 if no port is specified.
/// </summary>
/// <returns>The URI port as an integer.</returns>
int port() const { return m_components.m_port; }
/// <summary>
/// Get the path component of the URI as an encoded string.
/// </summary>
/// <returns>The URI path as a string.</returns>
const utility::string_t& path() const { return m_components.m_path; }
/// <summary>
/// Get the query component of the URI as an encoded string.
/// </summary>
/// <returns>The URI query as a string.</returns>
const utility::string_t& query() const { return m_components.m_query; }
/// <summary>
/// Get the fragment component of the URI as an encoded string.
/// </summary>
/// <returns>The URI fragment as a string.</returns>
const utility::string_t& fragment() const { return m_components.m_fragment; }
/// <summary>
/// Creates a new uri object with the same authority portion as this one, omitting the resource and query portions.
/// </summary>
/// <returns>The new uri object with the same authority.</returns>
_ASYNCRTIMP uri authority() const;
/// <summary>
/// Gets the path, query, and fragment portion of this uri, which may be empty.
/// </summary>
/// <returns>The new URI object with the path, query and fragment portion of this URI.</returns>
_ASYNCRTIMP uri resource() const;
/// <summary>
/// An empty URI specifies no components, and serves as a default value
/// </summary>
bool is_empty() const { return this->m_uri.empty() || this->m_uri == _XPLATSTR("/"); }
/// <summary>
/// A loopback URI is one which refers to a hostname or ip address with meaning only on the local machine.
/// </summary>
/// <remarks>
/// Examples include "localhost", or "127.0.0.1". The only URIs for which this method returns true are "127.0.0.1", and "localhost",
/// all other URIs return false
/// </remarks>
/// <returns><c>true</c> if this URI references the local host, <c>false</c> otherwise.</returns>
bool is_host_loopback() const
{
return !is_empty() &&
((host() == _XPLATSTR("localhost")) || (host() == _XPLATSTR("127.0.0.1")));
}
/// <summary>
/// A wildcard URI is one which refers to all hostnames that resolve to the local machine (using the * or +)
/// </summary>
/// <example>
/// http://*:80
/// </example>
bool is_host_wildcard() const
{
return !is_empty() && (this->host() == _XPLATSTR("*") || this->host() == _XPLATSTR("+"));
}
/// <summary>
/// A portable URI is one with a hostname that can be resolved globally (used from another machine).
/// </summary>
/// <returns><c>true</c> if this URI can be resolved globally (used from another machine), <c>false</c>
/// otherwise.</returns> <remarks> The hostname "localhost" is a reserved name that is guaranteed to resolve to the
/// local machine, and cannot be used for inter-machine communication. Likewise the hostnames "*" and "+" on Windows
/// represent wildcards, and do not map to a resolvable address.
/// </remarks>
bool is_host_portable() const { return !(is_empty() || is_host_loopback() || is_host_wildcard()); }
/// <summary>
/// A default port is one where the port is unspecified, and will be determined by the operating system.
/// The choice of default port may be dictated by the scheme (http -> 80) or not.
/// </summary>
/// <returns><c>true</c> if this URI instance has a default port, <c>false</c> otherwise.</returns>
bool is_port_default() const { return !is_empty() && this->port() == 0; }
/// <summary>
/// An "authority" URI is one with only a scheme, optional userinfo, hostname, and (optional) port.
/// </summary>
/// <returns><c>true</c> if this is an "authority" URI, <c>false</c> otherwise.</returns>
bool is_authority() const { return !is_empty() && is_path_empty() && query().empty() && fragment().empty(); }
/// <summary>
/// Returns whether the other URI has the same authority as this one
/// </summary>
/// <param name="other">The URI to compare the authority with.</param>
/// <returns><c>true</c> if both the URI's have the same authority, <c>false</c> otherwise.</returns>
bool has_same_authority(const uri& other) const { return !is_empty() && this->authority() == other.authority(); }
/// <summary>
/// Returns whether the path portion of this URI is empty
/// </summary>
/// <returns><c>true</c> if the path portion of t
gitextract_wcms9_8e/ ├── .clang-format ├── .gitignore ├── .gitmodules ├── .vscode/ │ ├── launch.json │ └── settings.json ├── Build_android/ │ ├── configure.sh │ └── openssl/ │ ├── Makefile │ ├── openssl-1.0.2k.patch │ ├── openssl-1.0.2l.patch │ ├── openssl-1.0.2m.patch │ ├── openssl-1.0.2n.patch │ ├── openssl-1.1.0g.patch │ └── openssl-1.1.0j.patch ├── Build_iOS/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.md │ └── configure.sh ├── CMakeLists.txt ├── CONTRIBUTORS.txt ├── README.md ├── Release/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── cmake/ │ │ ├── cpprest_find_boost.cmake │ │ ├── cpprest_find_brotli.cmake │ │ ├── cpprest_find_openssl.cmake │ │ ├── cpprest_find_websocketpp.cmake │ │ ├── cpprest_find_winhttppal.cmake │ │ ├── cpprest_find_zlib.cmake │ │ ├── cpprestsdk-config-version.in.cmake │ │ └── cpprestsdk-config.in.cmake │ ├── include/ │ │ ├── cpprest/ │ │ │ ├── astreambuf.h │ │ │ ├── asyncrt_utils.h │ │ │ ├── base_uri.h │ │ │ ├── containerstream.h │ │ │ ├── details/ │ │ │ │ ├── SafeInt3.hpp │ │ │ │ ├── basic_types.h │ │ │ │ ├── cpprest_compat.h │ │ │ │ ├── fileio.h │ │ │ │ ├── http_helpers.h │ │ │ │ ├── http_server.h │ │ │ │ ├── http_server_api.h │ │ │ │ ├── nosal.h │ │ │ │ ├── resource.h │ │ │ │ └── web_utilities.h │ │ │ ├── filestream.h │ │ │ ├── http_client.h │ │ │ ├── http_compression.h │ │ │ ├── http_headers.h │ │ │ ├── http_listener.h │ │ │ ├── http_msg.h │ │ │ ├── interopstream.h │ │ │ ├── json.h │ │ │ ├── oauth1.h │ │ │ ├── oauth2.h │ │ │ ├── producerconsumerstream.h │ │ │ ├── rawptrstream.h │ │ │ ├── streams.h │ │ │ ├── uri.h │ │ │ ├── uri_builder.h │ │ │ ├── version.h │ │ │ ├── ws_client.h │ │ │ └── ws_msg.h │ │ └── pplx/ │ │ ├── pplx.h │ │ ├── pplxcancellation_token.h │ │ ├── pplxconv.h │ │ ├── pplxinterface.h │ │ ├── pplxlinux.h │ │ ├── pplxtasks.h │ │ ├── pplxwin.h │ │ └── threadpool.h │ ├── public_apis_doxyfile │ ├── samples/ │ │ ├── .gitignore │ │ ├── BingRequest/ │ │ │ ├── CMakeLists.txt │ │ │ └── bingrequest.cpp │ │ ├── BlackJack/ │ │ │ ├── BlackJack_Client/ │ │ │ │ ├── BlackJackClient.cpp │ │ │ │ └── CMakeLists.txt │ │ │ ├── BlackJack_Server/ │ │ │ │ ├── BlackJack_Server.cpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Dealer.cpp │ │ │ │ ├── Table.cpp │ │ │ │ ├── Table.h │ │ │ │ ├── messagetypes.h │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── BlackJack_UIClient/ │ │ │ │ ├── App.xaml │ │ │ │ ├── App.xaml.cpp │ │ │ │ ├── App.xaml.h │ │ │ │ ├── CardShape.xaml │ │ │ │ ├── CardShape.xaml.cpp │ │ │ │ ├── CardShape.xaml.h │ │ │ │ ├── Common/ │ │ │ │ │ └── StandardStyles.xaml │ │ │ │ ├── Package.appxmanifest │ │ │ │ ├── Package.uwp.appxmanifest │ │ │ │ ├── Player.xaml │ │ │ │ ├── Player.xaml.cpp │ │ │ │ ├── Player.xaml.h │ │ │ │ ├── PlayingTable.xaml │ │ │ │ ├── PlayingTable.xaml.cpp │ │ │ │ ├── PlayingTable.xaml.h │ │ │ │ ├── messagetypes.h │ │ │ │ ├── pch.cpp │ │ │ │ └── pch.h │ │ │ └── CMakeLists.txt │ │ ├── CMakeLists.txt │ │ ├── CasaLens/ │ │ │ ├── AppCode.html │ │ │ ├── CasaLens141/ │ │ │ │ ├── AppCode.html │ │ │ │ ├── css/ │ │ │ │ │ └── default.css │ │ │ │ └── js/ │ │ │ │ └── default.js │ │ │ ├── ReadMe.txt │ │ │ ├── casalens.cpp │ │ │ ├── casalens.h │ │ │ ├── css/ │ │ │ │ └── default.css │ │ │ ├── datafetcher.cpp │ │ │ ├── js/ │ │ │ │ └── default.js │ │ │ ├── stdafx.cpp │ │ │ └── stdafx.h │ │ ├── FacebookDemo/ │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cpp │ │ │ ├── App.xaml.h │ │ │ ├── Common/ │ │ │ │ └── StandardStyles.xaml │ │ │ ├── Facebook.cpp │ │ │ ├── Facebook.h │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cpp │ │ │ ├── MainPage.xaml.h │ │ │ ├── Package.appxmanifest │ │ │ ├── Package.uwp.appxmanifest │ │ │ ├── pch.cpp │ │ │ └── pch.h │ │ ├── OAuth2Live/ │ │ │ ├── App.xaml │ │ │ ├── App.xaml.cpp │ │ │ ├── App.xaml.h │ │ │ ├── Common/ │ │ │ │ └── StandardStyles.xaml │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xaml.cpp │ │ │ ├── MainPage.xaml.h │ │ │ ├── Package.appxmanifest │ │ │ ├── Package.uwp.appxmanifest │ │ │ ├── pch.cpp │ │ │ └── pch.h │ │ ├── Oauth1Client/ │ │ │ ├── CMakeLists.txt │ │ │ └── Oauth1Client.cpp │ │ ├── Oauth2Client/ │ │ │ ├── CMakeLists.txt │ │ │ └── Oauth2Client.cpp │ │ ├── SearchFile/ │ │ │ ├── CMakeLists.txt │ │ │ └── searchfile.cpp │ │ └── WindowsLiveAuth/ │ │ ├── App.xaml │ │ ├── App.xaml.cpp │ │ ├── App.xaml.h │ │ ├── Common/ │ │ │ └── StandardStyles.xaml │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ ├── Package.appxmanifest │ │ ├── live_connect.h │ │ ├── pch.cpp │ │ └── pch.h │ ├── src/ │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── http/ │ │ │ ├── client/ │ │ │ │ ├── http_client.cpp │ │ │ │ ├── http_client_asio.cpp │ │ │ │ ├── http_client_impl.h │ │ │ │ ├── http_client_msg.cpp │ │ │ │ ├── http_client_winhttp.cpp │ │ │ │ ├── http_client_winrt.cpp │ │ │ │ └── x509_cert_utilities.cpp │ │ │ ├── common/ │ │ │ │ ├── connection_pool_helpers.h │ │ │ │ ├── http_compression.cpp │ │ │ │ ├── http_helpers.cpp │ │ │ │ ├── http_msg.cpp │ │ │ │ ├── internal_http_helpers.h │ │ │ │ └── x509_cert_utilities.h │ │ │ ├── listener/ │ │ │ │ ├── http_listener.cpp │ │ │ │ ├── http_listener_msg.cpp │ │ │ │ ├── http_server_api.cpp │ │ │ │ ├── http_server_asio.cpp │ │ │ │ ├── http_server_httpsys.cpp │ │ │ │ ├── http_server_httpsys.h │ │ │ │ └── http_server_impl.h │ │ │ └── oauth/ │ │ │ ├── oauth1.cpp │ │ │ └── oauth2.cpp │ │ ├── json/ │ │ │ ├── json.cpp │ │ │ ├── json_parsing.cpp │ │ │ └── json_serialization.cpp │ │ ├── pch/ │ │ │ ├── stdafx.cpp │ │ │ └── stdafx.h │ │ ├── pplx/ │ │ │ ├── pplx.cpp │ │ │ ├── pplxapple.cpp │ │ │ ├── pplxlinux.cpp │ │ │ ├── pplxwin.cpp │ │ │ └── threadpool.cpp │ │ ├── streams/ │ │ │ ├── fileio_posix.cpp │ │ │ ├── fileio_win32.cpp │ │ │ └── fileio_winrt.cpp │ │ ├── uri/ │ │ │ ├── uri.cpp │ │ │ └── uri_builder.cpp │ │ ├── utilities/ │ │ │ ├── asyncrt_utils.cpp │ │ │ ├── base64.cpp │ │ │ └── web_utilities.cpp │ │ └── websockets/ │ │ └── client/ │ │ ├── ws_client.cpp │ │ ├── ws_client_impl.h │ │ ├── ws_client_winrt.cpp │ │ ├── ws_client_wspp.cpp │ │ └── ws_msg.cpp │ └── tests/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── common/ │ │ ├── CMakeLists.txt │ │ ├── TestRunner/ │ │ │ ├── CMakeLists.txt │ │ │ ├── test_module_loader.cpp │ │ │ ├── test_module_loader.h │ │ │ └── test_runner.cpp │ │ ├── UnitTestpp/ │ │ │ ├── CMakeLists.txt │ │ │ ├── COPYING │ │ │ ├── ThirdPartyNotices.txt │ │ │ ├── config.h │ │ │ ├── src/ │ │ │ │ ├── AssertException.cpp │ │ │ │ ├── AssertException.h │ │ │ │ ├── CheckMacros.h │ │ │ │ ├── Checks.h │ │ │ │ ├── CompositeTestReporter.cpp │ │ │ │ ├── CompositeTestReporter.h │ │ │ │ ├── CurrentTest.cpp │ │ │ │ ├── CurrentTest.h │ │ │ │ ├── DeferredTestReporter.cpp │ │ │ │ ├── DeferredTestReporter.h │ │ │ │ ├── DeferredTestResult.cpp │ │ │ │ ├── DeferredTestResult.h │ │ │ │ ├── ExceptionMacros.h │ │ │ │ ├── ExecuteTest.h │ │ │ │ ├── GlobalSettings.cpp │ │ │ │ ├── GlobalSettings.h │ │ │ │ ├── HelperMacros.h │ │ │ │ ├── MemoryOutStream.cpp │ │ │ │ ├── MemoryOutStream.h │ │ │ │ ├── Posix/ │ │ │ │ │ ├── SignalTranslator.cpp │ │ │ │ │ ├── SignalTranslator.h │ │ │ │ │ ├── TimeHelpers.cpp │ │ │ │ │ └── TimeHelpers.h │ │ │ │ ├── ReportAssert.cpp │ │ │ │ ├── ReportAssert.h │ │ │ │ ├── ReportAssertImpl.h │ │ │ │ ├── Test.cpp │ │ │ │ ├── Test.h │ │ │ │ ├── TestDetails.cpp │ │ │ │ ├── TestDetails.h │ │ │ │ ├── TestList.cpp │ │ │ │ ├── TestList.h │ │ │ │ ├── TestMacros.h │ │ │ │ ├── TestProperties.h │ │ │ │ ├── TestReporter.cpp │ │ │ │ ├── TestReporter.h │ │ │ │ ├── TestReporterStdout.cpp │ │ │ │ ├── TestReporterStdout.h │ │ │ │ ├── TestResults.cpp │ │ │ │ ├── TestResults.h │ │ │ │ ├── TestRunner.cpp │ │ │ │ ├── TestRunner.h │ │ │ │ ├── TestSuite.h │ │ │ │ ├── TimeHelpers.h │ │ │ │ ├── Win32/ │ │ │ │ │ ├── TimeHelpers.cpp │ │ │ │ │ └── TimeHelpers.h │ │ │ │ ├── XmlTestReporter.cpp │ │ │ │ ├── XmlTestReporter.h │ │ │ │ ├── stdafx.cpp │ │ │ │ ├── stdafx.h │ │ │ │ └── tests/ │ │ │ │ ├── RecordingReporter.h │ │ │ │ ├── ScopedCurrentTest.h │ │ │ │ ├── TestAssertHandler.cpp │ │ │ │ ├── TestCheckMacros.cpp │ │ │ │ ├── TestChecks.cpp │ │ │ │ ├── TestCompositeTestReporter.cpp │ │ │ │ ├── TestCurrentTest.cpp │ │ │ │ ├── TestDeferredTestReporter.cpp │ │ │ │ ├── TestMemoryOutStream.cpp │ │ │ │ ├── TestTest.cpp │ │ │ │ ├── TestTestList.cpp │ │ │ │ ├── TestTestMacros.cpp │ │ │ │ ├── TestTestResults.cpp │ │ │ │ ├── TestTestRunner.cpp │ │ │ │ ├── TestTestSuite.cpp │ │ │ │ ├── TestUnitTestPP.cpp │ │ │ │ ├── TestXmlTestReporter.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ └── unittestpp.h │ │ └── utilities/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ ├── common_utilities_public.h │ │ │ ├── locale_guard.h │ │ │ └── os_utilities.h │ │ └── os_utilities.cpp │ └── functional/ │ ├── CMakeLists.txt │ ├── http/ │ │ ├── CMakeLists.txt │ │ ├── client/ │ │ │ ├── CMakeLists.txt │ │ │ ├── authentication_tests.cpp │ │ │ ├── building_request_tests.cpp │ │ │ ├── client_construction.cpp │ │ │ ├── compression_tests.cpp │ │ │ ├── connection_pool_tests.cpp │ │ │ ├── connections_and_errors.cpp │ │ │ ├── header_tests.cpp │ │ │ ├── http_client_fuzz_tests.cpp │ │ │ ├── http_client_tests.cpp │ │ │ ├── http_client_tests.h │ │ │ ├── http_methods_tests.cpp │ │ │ ├── multiple_requests.cpp │ │ │ ├── oauth1_tests.cpp │ │ │ ├── oauth2_tests.cpp │ │ │ ├── outside_tests.cpp │ │ │ ├── pipeline_stage_tests.cpp │ │ │ ├── progress_handler_tests.cpp │ │ │ ├── proxy_tests.cpp │ │ │ ├── redirect_tests.cpp │ │ │ ├── request_helper_tests.cpp │ │ │ ├── request_stream_tests.cpp │ │ │ ├── request_uri_tests.cpp │ │ │ ├── response_extract_tests.cpp │ │ │ ├── response_stream_tests.cpp │ │ │ ├── status_code_reason_phrase_tests.cpp │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ ├── timeout_handler.h │ │ │ └── to_string_tests.cpp │ │ ├── listener/ │ │ │ ├── CMakeLists.txt │ │ │ ├── building_response_tests.cpp │ │ │ ├── connections_and_errors.cpp │ │ │ ├── header_tests.cpp │ │ │ ├── http_listener_tests.h │ │ │ ├── listener_construction_tests.cpp │ │ │ ├── reply_helper_tests.cpp │ │ │ ├── request_extract_tests.cpp │ │ │ ├── request_handler_tests.cpp │ │ │ ├── request_relative_uri_tests.cpp │ │ │ ├── request_stream_tests.cpp │ │ │ ├── requests_tests.cpp │ │ │ ├── response_stream_tests.cpp │ │ │ ├── status_code_reason_phrase_tests.cpp │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── to_string_tests.cpp │ │ └── utilities/ │ │ ├── CMakeLists.txt │ │ ├── http_asserts.cpp │ │ ├── include/ │ │ │ ├── http_asserts.h │ │ │ ├── http_test_utilities.h │ │ │ ├── http_test_utilities_public.h │ │ │ ├── test_http_client.h │ │ │ ├── test_http_server.h │ │ │ └── test_server_utilities.h │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── test_http_client.cpp │ │ ├── test_http_server.cpp │ │ └── test_server_utilities.cpp │ ├── json/ │ │ ├── CMakeLists.txt │ │ ├── construction_tests.cpp │ │ ├── fuzz_tests.cpp │ │ ├── iterator_tests.cpp │ │ ├── json_numbers_tests.cpp │ │ ├── negative_parsing_tests.cpp │ │ ├── parsing_tests.cpp │ │ └── to_as_and_operators_tests.cpp │ ├── misc/ │ │ └── atl_headers/ │ │ ├── Resource.h │ │ ├── header_test1.cpp │ │ └── header_test2.cpp │ ├── pplx/ │ │ ├── CMakeLists.txt │ │ └── pplx_test/ │ │ ├── CMakeLists.txt │ │ ├── pplx_op_test.cpp │ │ ├── pplx_task_options.cpp │ │ ├── pplxtask_tests.cpp │ │ ├── stdafx.cpp │ │ └── stdafx.h │ ├── streams/ │ │ ├── CMakeLists.txt │ │ ├── CppSparseFile.cpp │ │ ├── CppSparseFile.h │ │ ├── fstreambuf_tests.cpp │ │ ├── fuzz_tests.cpp │ │ ├── istream_tests.cpp │ │ ├── memstream_tests.cpp │ │ ├── ostream_tests.cpp │ │ ├── prefix.h │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── stdstream_tests.cpp │ │ ├── streams_tests.h │ │ └── winrt_interop_tests.cpp │ ├── uri/ │ │ ├── CMakeLists.txt │ │ ├── accessor_tests.cpp │ │ ├── combining_tests.cpp │ │ ├── constructor_tests.cpp │ │ ├── conversions_tests.cpp │ │ ├── diagnostic_tests.cpp │ │ ├── encoding_tests.cpp │ │ ├── operator_tests.cpp │ │ ├── resolve_uri_tests.cpp │ │ ├── splitting_tests.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── uri_builder_tests.cpp │ │ └── uri_tests.h │ ├── utils/ │ │ ├── CMakeLists.txt │ │ ├── base64.cpp │ │ ├── datetime.cpp │ │ ├── macro_test.cpp │ │ ├── nonce_generator_tests.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── strings.cpp │ │ ├── utils_tests.h │ │ └── win32_encryption_tests.cpp │ └── websockets/ │ ├── CMakeLists.txt │ ├── client/ │ │ ├── authentication_tests.cpp │ │ ├── client_construction.cpp │ │ ├── close_tests.cpp │ │ ├── error_tests.cpp │ │ ├── proxy_tests.cpp │ │ ├── receive_msg_tests.cpp │ │ ├── send_msg_tests.cpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── websocket_client_tests.h │ └── utilities/ │ ├── stdafx.cpp │ ├── stdafx.h │ ├── test_websocket_server.cpp │ └── test_websocket_server.h ├── SECURITY.md ├── ThirdPartyNotices.txt ├── azure-devops/ │ ├── build-ubuntu-apt.yml │ ├── build-ubuntu-vcpkg.yml │ ├── build-windows.yml │ └── vcpkg-windows.txt ├── azure-pipelines.yml ├── changelog.md └── license.txt
Showing preview only (404K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2671 symbols across 268 files)
FILE: Release/include/cpprest/astreambuf.h
function namespace (line 28) | namespace pplx
function namespace (line 47) | namespace Concurrency
type typename (line 808) | typedef typename details::basic_streambuf<_CharType>::pos_type pos_type;
type typename (line 809) | typedef typename details::basic_streambuf<_CharType>::off_type off_type;
type typename (line 810) | typedef typename details::basic_streambuf<_CharType>::char_type char_type;
function m_buffer (line 819) | m_buffer(ptr) {}
function virtual (line 876) | virtual ~streambuf() {}
function std (line 878) | const std::shared_ptr<details::basic_streambuf<_CharType>>& get_base() c...
function virtual (line 978) | virtual pplx::task<void> close(std::ios_base::openmode mode, std::except...
function virtual (line 990) | virtual pplx::task<int_type> putc(_CharType ch) { return get_base()->put...
function virtual (line 998) | virtual _CharType* alloc(size_t count) { return get_base()->alloc(count); }
function virtual (line 1004) | virtual void commit(size_t count) { get_base()->commit(count); }
function virtual (line 1019) | virtual bool acquire(_Out_ _CharType*& ptr, _Out_ size_t& count)
function virtual (line 1032) | virtual void release(_Out_writes_(count) _CharType* ptr, _In_ size_t cou...
function virtual (line 1051) | virtual pplx::task<size_t> putn_nocopy(const _CharType* ptr, size_t count)
function virtual (line 1060) | virtual pplx::task<int_type> bumpc() { return get_base()->bumpc(); }
function virtual (line 1073) | virtual pplx::task<int_type> getc() { return get_base()->getc(); }
function virtual (line 1102) | virtual pplx::task<size_t> getn(_Out_writes_(count) _CharType* ptr, _In_...
function virtual (line 1114) | virtual size_t scopy(_Out_writes_(count) _CharType* ptr, _In_ size_t count)
function virtual (line 1167) | virtual pplx::task<void> sync() { return get_base()->sync(); }
FILE: Release/include/cpprest/asyncrt_utils.h
function namespace (line 38) | namespace utility
function namespace (line 302) | namespace details
function class (line 504) | class windows_category_impl : public std::error_category
function std (line 538) | inline std::system_error __cdecl create_system_error(unsigned long error...
function std (line 547) | inline std::error_code __cdecl create_error_code(unsigned long errorCode)
function utility (line 555) | inline utility::string_t __cdecl create_error_message(unsigned long erro...
function class (line 562) | class datetime
function class (line 692) | class nonce_generator
FILE: Release/include/cpprest/base_uri.h
function namespace (line 23) | namespace web
function class (line 76) | class uri_exception : public std::exception
function class (line 113) | class uri
function has_same_authority (line 348) | bool has_same_authority(const uri& other) const { return !is_empty() && ...
function operator (line 374) | bool operator!=(const uri& other) const { return !(this->operator==(othe...
FILE: Release/include/cpprest/containerstream.h
function namespace (line 24) | namespace Concurrency
function write (line 420) | size_t write(const _CharType* ptr, size_t count)
function resize_for_write (line 441) | void resize_for_write(size_t newPos)
function update_current_position (line 453) | void update_current_position(size_t newPos)
type container_buffer (line 526) | typedef container_buffer<_CollectionType> buffer_type;
function concurrency (line 533) | static concurrency::streams::basic_istream<char_type> open_istream(_Coll...
function concurrency (line 542) | static concurrency::streams::basic_ostream<char_type> open_ostream()
type container_stream (line 552) | typedef container_stream<std::basic_string<char>> stringstream;
type stringstream (line 553) | typedef stringstream::buffer_type stringstreambuf;
type container_stream (line 555) | typedef container_stream<utility::string_t> wstringstream;
type wstringstream (line 556) | typedef wstringstream::buffer_type wstringstreambuf;
function class (line 561) | class bytestream
FILE: Release/include/cpprest/details/SafeInt3.hpp
type msl (line 542) | namespace msl
type safeint3 (line 544) | namespace safeint3
type SafeIntError (line 550) | enum SafeIntError
function SafeIntExceptionAssert (line 648) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW { SAFEINT_ASSER...
function SafeIntExceptionAssert (line 650) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW {}
function SafeIntException (line 665) | class SAFEINT_VISIBLE SafeIntException
type SafeIntInternal (line 673) | namespace SafeIntInternal
class SafeIntExceptionHandler (line 681) | class SafeIntExceptionHandler
class SafeIntExceptionHandler<SafeIntException> (line 684) | class SafeIntExceptionHandler<SafeIntException>
method SAFEINT_STDCALL (line 687) | SAFEINT_STDCALL SafeIntOnOverflow()
method SAFEINT_STDCALL (line 693) | SAFEINT_STDCALL SafeIntOnDivZero()
class SafeInt_InvalidParameter (line 708) | class SafeInt_InvalidParameter
method SAFEINT_NORETURN (line 711) | static SAFEINT_NORETURN void SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_NORETURN (line 717) | static SAFEINT_NORETURN void SafeIntOnDivZero() SAFEINT_NOTHROW
class SafeIntWin32ExceptionHandler (line 726) | class SafeIntWin32ExceptionHandler
method SAFEINT_STDCALL (line 729) | SAFEINT_STDCALL SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_STDCALL (line 735) | SAFEINT_STDCALL SafeIntOnDivZero() SAFEINT_NOTHROW
class CompileConst (line 799) | class CompileConst
class CompileConst<true> (line 801) | class CompileConst<true>
class CompileConst<false> (line 807) | class CompileConst<false>
class NumericType (line 822) | class NumericType
class NumericType<bool> (line 827) | class NumericType<bool>
class NumericType (line 838) | class NumericType
class NumericType<bool> (line 855) | class NumericType<bool>
class NumericType<char> (line 866) | class NumericType<char>
class NumericType<unsigned char> (line 877) | class NumericType<unsigned char>
class NumericType<signed char> (line 888) | class NumericType<signed char>
class NumericType<short> (line 899) | class NumericType<short>
class NumericType<unsigned short> (line 910) | class NumericType<unsigned short>
class NumericType<wchar_t> (line 922) | class NumericType<wchar_t>
class NumericType<int> (line 934) | class NumericType<int>
class NumericType<unsigned int> (line 945) | class NumericType<unsigned int>
class NumericType<long> (line 956) | class NumericType<long>
class NumericType<unsigned long> (line 967) | class NumericType<unsigned long>
class NumericType<__int64> (line 978) | class NumericType<__int64>
class NumericType<unsigned __int64> (line 989) | class NumericType<unsigned __int64>
class NumericType<float> (line 1000) | class NumericType<float>
class NumericType<double> (line 1011) | class NumericType<double>
class NumericType<long double> (line 1022) | class NumericType<long double>
class NumericType (line 1034) | class NumericType
class SafeIntMinMax (line 1054) | class SafeIntMinMax
class SafeIntMinMax<true, 8> (line 1057) | class SafeIntMinMax<true, 8>
class SafeIntMinMax<true, 16> (line 1064) | class SafeIntMinMax<true, 16>
class SafeIntMinMax<true, 32> (line 1071) | class SafeIntMinMax<true, 32>
class SafeIntMinMax<true, 64> (line 1078) | class SafeIntMinMax<true, 64>
class SafeIntMinMax<false, 8> (line 1086) | class SafeIntMinMax<false, 8>
class SafeIntMinMax<false, 16> (line 1093) | class SafeIntMinMax<false, 16>
class SafeIntMinMax<false, 32> (line 1100) | class SafeIntMinMax<false, 32>
class SafeIntMinMax<false, 64> (line 1107) | class SafeIntMinMax<false, 64>
class IntTraits (line 1115) | class IntTraits
class SafeIntCompare (line 1153) | class SafeIntCompare
class IntRegion (line 1174) | class IntRegion
type AbsMethod (line 1223) | enum AbsMethod
class GetAbsMethod (line 1231) | class GetAbsMethod
class AbsValueHelper (line 1246) | class AbsValueHelper
class AbsValueHelper<T, AbsMethodInt> (line 1249) | class AbsValueHelper<T, AbsMethodInt>
class AbsValueHelper<T, AbsMethodInt64> (line 1260) | class AbsValueHelper<T, AbsMethodInt64>
class AbsValueHelper<T, AbsMethodNoop> (line 1271) | class AbsValueHelper<T, AbsMethodNoop>
method T (line 1274) | static T Abs(T t) SAFEINT_NOTHROW
class NegationHelper (line 1283) | class NegationHelper
class NegationHelper<T, true> (line 1297) | class NegationHelper<T, true> // Signed
method T (line 1301) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1312) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
class SignedNegation (line 1328) | class SignedNegation
class SignedNegation<signed __int32> (line 1331) | class SignedNegation<signed __int32>
method Value (line 1334) | static signed __int32 Value(unsigned __int64 in) SAFEINT_NOTHROW
method Value (line 1339) | static signed __int32 Value(unsigned __int32 in) SAFEINT_NOTHROW {...
class SignedNegation<signed __int64> (line 1343) | class SignedNegation<signed __int64>
method Value (line 1346) | static signed __int64 Value(unsigned __int64 in) SAFEINT_NOTHROW {...
class NegationHelper<T, false> (line 1350) | class NegationHelper<T, false> // unsigned
method T (line 1354) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1376) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
type CastMethod (line 1393) | enum CastMethod
class GetCastMethod (line 1407) | class GetCastMethod
class GetCastMethod<float, FromType> (line 1441) | class GetCastMethod<float, FromType>
class GetCastMethod<double, FromType> (line 1451) | class GetCastMethod<double, FromType>
class GetCastMethod<long double, FromType> (line 1461) | class GetCastMethod<long double, FromType>
class GetCastMethod<ToType, float> (line 1471) | class GetCastMethod<ToType, float>
class GetCastMethod<ToType, double> (line 1481) | class GetCastMethod<ToType, double>
class GetCastMethod<ToType, long double> (line 1491) | class GetCastMethod<ToType, long double>
class SafeCastHelper (line 1501) | class SafeCastHelper
class SafeCastHelper<T, U, CastOK> (line 1504) | class SafeCastHelper<T, U, CastOK>
method Cast (line 1507) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1514) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastFromFloat> (line 1523) | class SafeCastHelper<T, U, CastFromFloat>
method Cast (line 1526) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1537) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, bool, CastFromBool> (line 1550) | class SafeCastHelper<T, bool, CastFromBool>
method Cast (line 1553) | static bool Cast(bool b, T& t) SAFEINT_NOTHROW
method CastThrow (line 1560) | static void CastThrow(bool b, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<bool, T, CastToBool> (line 1567) | class SafeCastHelper<bool, T, CastToBool>
method Cast (line 1570) | static bool Cast(T t, bool& b) SAFEINT_NOTHROW
method CastThrow (line 1577) | static void CastThrow(T t, bool& b) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckLTZero> (line 1584) | class SafeCastHelper<T, U, CastCheckLTZero>
method Cast (line 1587) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1596) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckGTMax> (line 1605) | class SafeCastHelper<T, U, CastCheckGTMax>
method Cast (line 1608) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1617) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned> (line 1626) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned>
method Cast (line 1629) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1639) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned> (line 1649) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned>
method Cast (line 1652) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1662) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
type ComparisonMethod (line 1672) | enum ComparisonMethod
class ValidComparison (line 1701) | class ValidComparison
class EqualityTest (line 1722) | class EqualityTest
class EqualityTest<T, U, ComparisonMethod_Ok> (line 1725) | class EqualityTest<T, U, ComparisonMethod_Ok>
method IsEquals (line 1728) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt> (line 1732) | class EqualityTest<T, U, ComparisonMethod_CastInt>
method IsEquals (line 1735) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt64> (line 1739) | class EqualityTest<T, U, ComparisonMethod_CastInt64>
method IsEquals (line 1742) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_UnsignedT> (line 1746) | class EqualityTest<T, U, ComparisonMethod_UnsignedT>
method IsEquals (line 1749) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class EqualityTest<T, U, ComparisonMethod_UnsignedU> (line 1760) | class EqualityTest<T, U, ComparisonMethod_UnsignedU>
method IsEquals (line 1763) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest (line 1774) | class GreaterThanTest
class GreaterThanTest<T, U, ComparisonMethod_Ok> (line 1777) | class GreaterThanTest<T, U, ComparisonMethod_Ok>
method GreaterThan (line 1780) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt> (line 1784) | class GreaterThanTest<T, U, ComparisonMethod_CastInt>
method GreaterThan (line 1787) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt64> (line 1791) | class GreaterThanTest<T, U, ComparisonMethod_CastInt64>
method GreaterThan (line 1794) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_UnsignedT> (line 1798) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedT>
method GreaterThan (line 1801) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest<T, U, ComparisonMethod_UnsignedU> (line 1812) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedU>
method GreaterThan (line 1815) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class ModulusHelper (line 1828) | class ModulusHelper
class ModulusHelper<T, U, ComparisonMethod_Ok> (line 1831) | class ModulusHelper<T, U, ComparisonMethod_Ok>
method SafeIntError (line 1834) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1855) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt> (line 1874) | class ModulusHelper<T, U, ComparisonMethod_CastInt>
method SafeIntError (line 1877) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1896) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt64> (line 1915) | class ModulusHelper<T, U, ComparisonMethod_CastInt64>
method SafeIntError (line 1918) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1937) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedT> (line 1956) | class ModulusHelper<T, U, ComparisonMethod_UnsignedT>
method SafeIntError (line 1959) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1974) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedU> (line 1988) | class ModulusHelper<T, U, ComparisonMethod_UnsignedU>
method SafeIntError (line 1991) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 2005) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
type MultiplicationState (line 2018) | enum MultiplicationState
class MultiplicationMethod (line 2040) | class MultiplicationMethod
class MultiplicationHelper (line 2114) | class MultiplicationHelper
class MultiplicationHelper<T, U, MultiplicationState_CastInt> (line 2117) | class MultiplicationHelper<T, U, MultiplicationState_CastInt>
method Multiply (line 2121) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2132) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint> (line 2143) | class MultiplicationHelper<T, U, MultiplicationState_CastUint>
method Multiply (line 2147) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2158) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastInt64> (line 2169) | class MultiplicationHelper<T, U, MultiplicationState_CastInt64>
method Multiply (line 2173) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2184) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint64> (line 2195) | class MultiplicationHelper<T, U, MultiplicationState_CastUint64>
method Multiply (line 2199) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2210) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class LargeIntRegMultiply (line 2223) | class LargeIntRegMultiply
function IntrinsicMultiplyUint64 (line 2227) | inline bool IntrinsicMultiplyUint64(const unsigned __int64& a,
function IntrinsicMultiplyInt64 (line 2237) | inline bool IntrinsicMultiplyInt64(const signed __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int64> (line 2269) | class LargeIntRegMultiply<unsigned __int64, unsigned __int64>
method RegMultiply (line 2272) | static bool RegMultiply(const unsigned __int64& a,
method RegMultiplyThrow (line 2333) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int32> (line 2394) | class LargeIntRegMultiply<unsigned __int64, unsigned __int32>
method RegMultiply (line 2397) | static bool RegMultiply(const unsigned __int64& a, unsigned __int3...
method RegMultiplyThrow (line 2436) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, signed __int32> (line 2478) | class LargeIntRegMultiply<unsigned __int64, signed __int32>
method RegMultiply (line 2482) | static bool RegMultiply(const unsigned __int64& a, signed __int32 ...
method RegMultiplyThrow (line 2494) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<unsigned __int64, signed __int64> (line 2508) | class LargeIntRegMultiply<unsigned __int64, signed __int64>
method RegMultiply (line 2511) | static bool RegMultiply(const unsigned __int64& a, signed __int64 ...
method RegMultiplyThrow (line 2523) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<signed __int32, unsigned __int64> (line 2537) | class LargeIntRegMultiply<signed __int32, unsigned __int64>
method RegMultiply (line 2541) | static bool RegMultiply(signed __int32 a, const unsigned __int64& ...
method RegMultiplyThrow (line 2589) | static void RegMultiplyThrow(signed __int32 a, const unsigned __in...
class LargeIntRegMultiply<unsigned __int32, unsigned __int64> (line 2635) | class LargeIntRegMultiply<unsigned __int32, unsigned __int64>
method RegMultiply (line 2639) | static bool RegMultiply(unsigned __int32 a, const unsigned __int64...
method RegMultiplyThrow (line 2659) | static void RegMultiplyThrow(unsigned __int32 a,
class LargeIntRegMultiply<unsigned __int32, signed __int64> (line 2675) | class LargeIntRegMultiply<unsigned __int32, signed __int64>
method RegMultiply (line 2678) | static bool RegMultiply(unsigned __int32 a, const signed __int64& ...
method RegMultiplyThrow (line 2685) | static void RegMultiplyThrow(unsigned __int32 a, const signed __in...
class LargeIntRegMultiply<signed __int64, signed __int64> (line 2695) | class LargeIntRegMultiply<signed __int64, signed __int64>
method RegMultiply (line 2698) | static bool RegMultiply(const signed __int64& a, const signed __in...
method RegMultiplyThrow (line 2751) | static void RegMultiplyThrow(const signed __int64& a,
class LargeIntRegMultiply<signed __int64, unsigned __int32> (line 2806) | class LargeIntRegMultiply<signed __int64, unsigned __int32>
method RegMultiply (line 2809) | static bool RegMultiply(const signed __int64& a, unsigned __int32 ...
method RegMultiplyThrow (line 2852) | static void RegMultiplyThrow(const signed __int64& a, unsigned __i...
class LargeIntRegMultiply<signed __int64, signed __int32> (line 2896) | class LargeIntRegMultiply<signed __int64, signed __int32>
method RegMultiply (line 2899) | static bool RegMultiply(const signed __int64& a, signed __int32 b,...
method RegMultiplyThrow (line 2952) | static void RegMultiplyThrow(signed __int64 a, signed __int32 b, s...
class LargeIntRegMultiply<signed __int32, signed __int64> (line 3003) | class LargeIntRegMultiply<signed __int32, signed __int64>
method RegMultiply (line 3006) | static bool RegMultiply(signed __int32 a, const signed __int64& b,...
method RegMultiplyThrow (line 3070) | static void RegMultiplyThrow(signed __int32 a, const signed __int6...
class LargeIntRegMultiply<signed __int64, unsigned __int64> (line 3134) | class LargeIntRegMultiply<signed __int64, unsigned __int64>
method RegMultiply (line 3138) | static bool RegMultiply(const signed __int64& a, const unsigned __...
method RegMultiplyThrow (line 3179) | static void RegMultiplyThrow(const signed __int64& a,
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64> (line 3227) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64>
method Multiply (line 3231) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3241) | static void MultiplyThrow(const unsigned __int64& t, const unsigne...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint> (line 3252) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint>
method Multiply (line 3257) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3266) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintUint64> (line 3277) | class MultiplicationHelper<T, U, MultiplicationState_UintUint64>
method Multiply (line 3282) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3298) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int> (line 3311) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int>
method Multiply (line 3316) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3325) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64> (line 3335) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64>
method Multiply (line 3340) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3350) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintInt64> (line 3361) | class MultiplicationHelper<T, U, MultiplicationState_UintInt64>
method Multiply (line 3366) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3382) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint> (line 3395) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint>
method Multiply (line 3400) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3409) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int64> (line 3419) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int64>
method Multiply (line 3423) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3432) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int> (line 3442) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int>
method Multiply (line 3447) | static bool Multiply(const T& t, U u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3455) | static void MultiplyThrow(const __int64& t, U u, T& ret) SAFEINT_C...
class MultiplicationHelper<T, U, MultiplicationState_IntUint64> (line 3465) | class MultiplicationHelper<T, U, MultiplicationState_IntUint64>
method Multiply (line 3470) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3486) | static void MultiplyThrow(T t, const unsigned __int64& u, T& ret) ...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64> (line 3498) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64>
method Multiply (line 3503) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3512) | static void MultiplyThrow(const __int64& t, const unsigned __int64...
class MultiplicationHelper<T, U, MultiplicationState_IntInt64> (line 3523) | class MultiplicationHelper<T, U, MultiplicationState_IntInt64>
method Multiply (line 3528) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3544) | static void MultiplyThrow(T t, const U& u, T& ret) SAFEINT_CPP_THROW
type DivisionState (line 3555) | enum DivisionState
class DivisionMethod (line 3566) | class DivisionMethod
class DivisionHelper (line 3586) | class DivisionHelper
class DivisionHelper<T, U, DivisionState_OK> (line 3589) | class DivisionHelper<T, U, DivisionState_OK>
method SafeIntError (line 3592) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3607) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_UnsignedSigned> (line 3622) | class DivisionHelper<T, U, DivisionState_UnsignedSigned>
method SafeIntError (line 3625) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3653) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned32> (line 3682) | class DivisionHelper<T, U, DivisionState_SignedUnsigned32>
method SafeIntError (line 3685) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3708) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned64> (line 3733) | class DivisionHelper<T, U, DivisionState_SignedUnsigned64>
method SafeIntError (line 3736) | static SafeIntError Divide(const T& t, const unsigned __int64& u, ...
method DivideThrow (line 3773) | static void DivideThrow(const T& t, const unsigned __int64& u, T& ...
class DivisionHelper<T, U, DivisionState_SignedUnsigned> (line 3810) | class DivisionHelper<T, U, DivisionState_SignedUnsigned>
method SafeIntError (line 3815) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3833) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedSigned> (line 3851) | class DivisionHelper<T, U, DivisionState_SignedSigned>
method SafeIntError (line 3854) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3875) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
type AdditionState (line 3895) | enum AdditionState
class AdditionMethod (line 3916) | class AdditionMethod
class AdditionHelper (line 3985) | class AdditionHelper
class AdditionHelper<T, U, AdditionState_CastIntCheckMax> (line 3988) | class AdditionHelper<T, U, AdditionState_CastIntCheckMax>
method Addition (line 3991) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4006) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow> (line 4022) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow>
method Addition (line 4025) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4040) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax> (line 4056) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax>
method Addition (line 4059) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4074) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow> (line 4090) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow>
method Addition (line 4093) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4109) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax> (line 4126) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax>
method Addition (line 4129) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4145) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax> (line 4162) | class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax>
method Addition (line 4165) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4180) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax> (line 4196) | class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax>
method Addition (line 4199) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4214) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckMax> (line 4230) | class AdditionHelper<T, U, AdditionState_CastInt64CheckMax>
method Addition (line 4233) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4248) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax> (line 4264) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax>
method Addition (line 4267) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4300) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2> (line 4334) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2>
method Addition (line 4337) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4365) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow> (line 4394) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow>
method Addition (line 4397) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4418) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeIntMinMax> (line 4439) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeI...
method Addition (line 4442) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4459) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax> (line 4478) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax>
method Addition (line 4481) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4496) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64> (line 4514) | class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64>
method Addition (line 4517) | static bool Addition(const __int64& lhs, const unsigned __int64& r...
method AdditionThrow (line 4535) | static void AdditionThrow(const __int64& lhs, const unsigned __int...
class AdditionHelper<T, U, AdditionState_ManualCheck> (line 4552) | class AdditionHelper<T, U, AdditionState_ManualCheck>
method Addition (line 4555) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4574) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
type SubtractionState (line 4595) | enum SubtractionState
class SubtractionMethod (line 4624) | class SubtractionMethod
class SubtractionMethod2 (line 4675) | class SubtractionMethod2
class SubtractionHelper (line 4725) | class SubtractionHelper
class SubtractionHelper<T, U, SubtractionState_BothUnsigned> (line 4728) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned>
method Subtract (line 4731) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4744) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_BothUnsigned2> (line 4758) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned2>
method Subtract (line 4761) | static bool Subtract(const T& lhs, const U& rhs, U& result) SAFEIN...
method SubtractThrow (line 4775) | static void SubtractThrow(const T& lhs, const U& rhs, U& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMinMax> (line 4790) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4793) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4809) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMinMax2> (line 4820) | class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4823) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4833) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin> (line 4844) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin>
method Subtract (line 4847) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4863) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeIntMinMax> (line 4880) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4883) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4893) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeIntMinMax2> (line 4904) | class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4907) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4917) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin> (line 4928) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin>
method Subtract (line 4931) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4947) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Uint64Int> (line 4964) | class SubtractionHelper<T, U, SubtractionState_Uint64Int>
method Subtract (line 4967) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4992) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Uint64Int2> (line 5018) | class SubtractionHelper<U, T, SubtractionState_Uint64Int2>
method Subtract (line 5021) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5062) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_UintInt64> (line 5104) | class SubtractionHelper<T, U, SubtractionState_UintInt64>
method Subtract (line 5107) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5138) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_UintInt642> (line 5170) | class SubtractionHelper<U, T, SubtractionState_UintInt642>
method Subtract (line 5173) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5199) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Int> (line 5226) | class SubtractionHelper<T, U, SubtractionState_Int64Int>
method Subtract (line 5229) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5255) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Int2> (line 5281) | class SubtractionHelper<U, T, SubtractionState_Int64Int2>
method Subtract (line 5284) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5319) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntInt64> (line 5356) | class SubtractionHelper<T, U, SubtractionState_IntInt64>
method Subtract (line 5359) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5419) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntInt642> (line 5480) | class SubtractionHelper<U, T, SubtractionState_IntInt642>
method Subtract (line 5483) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5499) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint> (line 5515) | class SubtractionHelper<T, U, SubtractionState_Int64Uint>
method Subtract (line 5518) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5534) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Uint2> (line 5551) | class SubtractionHelper<U, T, SubtractionState_Int64Uint2>
method Subtract (line 5555) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5570) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntUint64> (line 5586) | class SubtractionHelper<T, U, SubtractionState_IntUint64>
method Subtract (line 5589) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5619) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntUint642> (line 5650) | class SubtractionHelper<U, T, SubtractionState_IntUint642>
method Subtract (line 5653) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5666) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint64> (line 5680) | class SubtractionHelper<T, U, SubtractionState_Int64Uint64>
method Subtract (line 5683) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5699) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
class SubtractionHelper<U, T, SubtractionState_Int64Uint642> (line 5717) | class SubtractionHelper<U, T, SubtractionState_Int64Uint642>
method Subtract (line 5722) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5735) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
type BinaryState (line 5748) | enum BinaryState
class BinaryMethod (line 5757) | class BinaryMethod
class BinaryAndHelper (line 5780) | class BinaryAndHelper
class BinaryAndHelper<T, U, BinaryState_OK> (line 5783) | class BinaryAndHelper<T, U, BinaryState_OK>
method T (line 5786) | static T And(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs & rhs); }
class BinaryAndHelper<T, U, BinaryState_Int8> (line 5790) | class BinaryAndHelper<T, U, BinaryState_Int8>
method T (line 5793) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int16> (line 5802) | class BinaryAndHelper<T, U, BinaryState_Int16>
method T (line 5805) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int32> (line 5814) | class BinaryAndHelper<T, U, BinaryState_Int32>
method T (line 5817) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper (line 5826) | class BinaryOrHelper
class BinaryOrHelper<T, U, BinaryState_OK> (line 5829) | class BinaryOrHelper<T, U, BinaryState_OK>
method T (line 5832) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs | rhs); }
class BinaryOrHelper<T, U, BinaryState_Int8> (line 5836) | class BinaryOrHelper<T, U, BinaryState_Int8>
method T (line 5839) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int16> (line 5848) | class BinaryOrHelper<T, U, BinaryState_Int16>
method T (line 5851) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int32> (line 5860) | class BinaryOrHelper<T, U, BinaryState_Int32>
method T (line 5863) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper (line 5872) | class BinaryXorHelper
class BinaryXorHelper<T, U, BinaryState_OK> (line 5875) | class BinaryXorHelper<T, U, BinaryState_OK>
method T (line 5878) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs ^ rhs); }
class BinaryXorHelper<T, U, BinaryState_Int8> (line 5882) | class BinaryXorHelper<T, U, BinaryState_Int8>
method T (line 5885) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int16> (line 5894) | class BinaryXorHelper<T, U, BinaryState_Int16>
method T (line 5897) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int32> (line 5906) | class BinaryXorHelper<T, U, BinaryState_Int32>
method T (line 5909) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
function SafeCast (line 5923) | inline bool SafeCast(const T From, U& To) SAFEINT_NOTHROW
function SafeEquals (line 5929) | inline bool SafeEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeNotEquals (line 5935) | inline bool SafeNotEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThan (line 5941) | inline bool SafeGreaterThan(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThanEquals (line 5947) | inline bool SafeGreaterThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThan (line 5953) | inline bool SafeLessThan(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThanEquals (line 5959) | inline bool SafeLessThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeModulus (line 5965) | inline bool SafeModulus(const T& t, const U& u, T& result) SAFEINT_N...
function SafeMultiply (line 5971) | inline bool SafeMultiply(T t, U u, T& result) SAFEINT_NOTHROW
function SafeDivide (line 5977) | inline bool SafeDivide(T t, U u, T& result) SAFEINT_NOTHROW
function SafeAdd (line 5983) | inline bool SafeAdd(T t, U u, T& result) SAFEINT_NOTHROW
function SafeSubtract (line 5989) | inline bool SafeSubtract(T t, U u, T& result) SAFEINT_NOTHROW
class SafeInt (line 5999) | class SafeInt
method SafeInt (line 6002) | SafeInt() SAFEINT_NOTHROW
method SafeInt (line 6011) | SafeInt(const T& i) SAFEINT_NOTHROW
method SafeInt (line 6019) | SafeInt(bool b) SAFEINT_NOTHROW
method SafeInt (line 6025) | constexpr SafeInt(const SafeInt<T, E>& u) SAFEINT_CPP_THROW = defa...
method SafeInt (line 6028) | SafeInt(const SafeInt<U, E>& u) SAFEINT_CPP_THROW
method SafeInt (line 6035) | SafeInt(const U& i) SAFEINT_CPP_THROW
method T (line 6213) | T* Ptr() SAFEINT_NOTHROW { return &m_int; }
method T (line 6214) | const T* Ptr() const SAFEINT_NOTHROW { return &m_int; }
method T (line 6215) | const T& Ref() const SAFEINT_NOTHROW { return m_int; }
method T (line 6222) | T* operator&() SAFEINT_NOTHROW { return &m_int; }
method T (line 6223) | const T* operator&() const SAFEINT_NOTHROW { return &m_int; }
method Min (line 6724) | SafeInt<T, E> Min(SafeInt<T, E> test, const T floor = IntTraits<T>...
method Max (line 6730) | SafeInt<T, E> Max(SafeInt<T, E> test, const T upper = IntTraits<T>...
method Swap (line 6736) | void Swap(SafeInt<T, E>& with) SAFEINT_NOTHROW
method SafeAtoI (line 6743) | static SafeInt<T, E> SafeAtoI(const char* input) SAFEINT_CPP_THROW...
method SafeWtoI (line 6745) | static SafeInt<T, E> SafeWtoI(const wchar_t* input) { return SafeT...
type alignBits (line 6747) | enum alignBits
method SafeTtoI (line 6798) | static SafeInt<T, E> SafeTtoI(U* input) SAFEINT_CPP_THROW
function SafePtrDiff (line 6839) | SafeInt<ptrdiff_t, SafeIntDefaultExceptionHandler> SafePtrDiff(const...
class ModulusSimpleCaseHelper (line 6986) | class ModulusSimpleCaseHelper
class ModulusSignedCaseHelper (line 6989) | class ModulusSignedCaseHelper
class ModulusSignedCaseHelper<T, E, true> (line 6992) | class ModulusSignedCaseHelper<T, E, true>
method SignedCase (line 6995) | static bool SignedCase(SafeInt<T, E> rhs, SafeInt<T, E>& result) S...
class ModulusSignedCaseHelper<T, E, false> (line 7007) | class ModulusSignedCaseHelper<T, E, false>
method SignedCase (line 7010) | static bool SignedCase(SafeInt<T, E> /*rhs*/, SafeInt<T, E>& /*res...
class ModulusSimpleCaseHelper<T, U, E, true> (line 7014) | class ModulusSimpleCaseHelper<T, U, E, true>
method ModulusSimpleCase (line 7017) | static bool ModulusSimpleCase(U lhs, SafeInt<T, E> rhs, SafeInt<T,...
class ModulusSimpleCaseHelper<T, U, E, false> (line 7032) | class ModulusSimpleCaseHelper<T, U, E, false>
method ModulusSimpleCase (line 7035) | static bool ModulusSimpleCase(U /*lhs*/, SafeInt<T, E> /*rhs*/, Sa...
class DivisionNegativeCornerCaseHelper (line 7073) | class DivisionNegativeCornerCaseHelper
class DivisionNegativeCornerCaseHelper<T, U, E, true> (line 7076) | class DivisionNegativeCornerCaseHelper<T, U, E, true>
method NegativeCornerCase (line 7079) | static bool NegativeCornerCase(U lhs, SafeInt<T, E> rhs, SafeInt<T...
class DivisionNegativeCornerCaseHelper<T, U, E, false> (line 7111) | class DivisionNegativeCornerCaseHelper<T, U, E, false>
method NegativeCornerCase (line 7114) | static bool NegativeCornerCase(U /*lhs*/, SafeInt<T, E> /*rhs*/, S...
class DivisionCornerCaseHelper (line 7121) | class DivisionCornerCaseHelper
class DivisionCornerCaseHelper<T, U, E, true> (line 7124) | class DivisionCornerCaseHelper<T, U, E, true>
method DivisionCornerCase1 (line 7127) | static bool DivisionCornerCase1(U lhs, SafeInt<T, E> rhs, SafeInt<...
class DivisionCornerCaseHelper<T, U, E, false> (line 7153) | class DivisionCornerCaseHelper<T, U, E, false>
method DivisionCornerCase1 (line 7156) | static bool DivisionCornerCase1(U /*lhs*/, SafeInt<T, E> /*rhs*/, ...
class DivisionCornerCaseHelper2 (line 7163) | class DivisionCornerCaseHelper2
class DivisionCornerCaseHelper2<T, U, E, true> (line 7166) | class DivisionCornerCaseHelper2<T, U, E, true>
method DivisionCornerCase2 (line 7169) | static bool DivisionCornerCase2(U lhs, SafeInt<T, E> rhs, SafeInt<...
class DivisionCornerCaseHelper2<T, U, E, false> (line 7201) | class DivisionCornerCaseHelper2<T, U, E, false>
method DivisionCornerCase2 (line 7204) | static bool DivisionCornerCase2(U /*lhs*/, SafeInt<T, E> /*rhs*/, ...
function T (line 7252) | T& operator+=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7261) | T& operator-=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7270) | T& operator*=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7279) | T& operator/=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7288) | T& operator%=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7297) | T& operator&=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7304) | T& operator^=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7311) | T& operator|=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7318) | T& operator<<=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7325) | T& operator>>=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7336) | T*& operator+=(T*& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7349) | T*& operator-=(T*& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7359) | T*& operator*=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7367) | T*& operator/=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7375) | T*& operator%=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7383) | T*& operator&=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7391) | T*& operator^=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7399) | T*& operator|=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7407) | T*& operator<<=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7415) | T*& operator>>=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
type safeint3 (line 638) | namespace safeint3
type SafeIntError (line 550) | enum SafeIntError
function SafeIntExceptionAssert (line 648) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW { SAFEINT_ASSER...
function SafeIntExceptionAssert (line 650) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW {}
function SafeIntException (line 665) | class SAFEINT_VISIBLE SafeIntException
type SafeIntInternal (line 673) | namespace SafeIntInternal
class SafeIntExceptionHandler (line 681) | class SafeIntExceptionHandler
class SafeIntExceptionHandler<SafeIntException> (line 684) | class SafeIntExceptionHandler<SafeIntException>
method SAFEINT_STDCALL (line 687) | SAFEINT_STDCALL SafeIntOnOverflow()
method SAFEINT_STDCALL (line 693) | SAFEINT_STDCALL SafeIntOnDivZero()
class SafeInt_InvalidParameter (line 708) | class SafeInt_InvalidParameter
method SAFEINT_NORETURN (line 711) | static SAFEINT_NORETURN void SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_NORETURN (line 717) | static SAFEINT_NORETURN void SafeIntOnDivZero() SAFEINT_NOTHROW
class SafeIntWin32ExceptionHandler (line 726) | class SafeIntWin32ExceptionHandler
method SAFEINT_STDCALL (line 729) | SAFEINT_STDCALL SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_STDCALL (line 735) | SAFEINT_STDCALL SafeIntOnDivZero() SAFEINT_NOTHROW
class CompileConst (line 799) | class CompileConst
class CompileConst<true> (line 801) | class CompileConst<true>
class CompileConst<false> (line 807) | class CompileConst<false>
class NumericType (line 822) | class NumericType
class NumericType<bool> (line 827) | class NumericType<bool>
class NumericType (line 838) | class NumericType
class NumericType<bool> (line 855) | class NumericType<bool>
class NumericType<char> (line 866) | class NumericType<char>
class NumericType<unsigned char> (line 877) | class NumericType<unsigned char>
class NumericType<signed char> (line 888) | class NumericType<signed char>
class NumericType<short> (line 899) | class NumericType<short>
class NumericType<unsigned short> (line 910) | class NumericType<unsigned short>
class NumericType<wchar_t> (line 922) | class NumericType<wchar_t>
class NumericType<int> (line 934) | class NumericType<int>
class NumericType<unsigned int> (line 945) | class NumericType<unsigned int>
class NumericType<long> (line 956) | class NumericType<long>
class NumericType<unsigned long> (line 967) | class NumericType<unsigned long>
class NumericType<__int64> (line 978) | class NumericType<__int64>
class NumericType<unsigned __int64> (line 989) | class NumericType<unsigned __int64>
class NumericType<float> (line 1000) | class NumericType<float>
class NumericType<double> (line 1011) | class NumericType<double>
class NumericType<long double> (line 1022) | class NumericType<long double>
class NumericType (line 1034) | class NumericType
class SafeIntMinMax (line 1054) | class SafeIntMinMax
class SafeIntMinMax<true, 8> (line 1057) | class SafeIntMinMax<true, 8>
class SafeIntMinMax<true, 16> (line 1064) | class SafeIntMinMax<true, 16>
class SafeIntMinMax<true, 32> (line 1071) | class SafeIntMinMax<true, 32>
class SafeIntMinMax<true, 64> (line 1078) | class SafeIntMinMax<true, 64>
class SafeIntMinMax<false, 8> (line 1086) | class SafeIntMinMax<false, 8>
class SafeIntMinMax<false, 16> (line 1093) | class SafeIntMinMax<false, 16>
class SafeIntMinMax<false, 32> (line 1100) | class SafeIntMinMax<false, 32>
class SafeIntMinMax<false, 64> (line 1107) | class SafeIntMinMax<false, 64>
class IntTraits (line 1115) | class IntTraits
class SafeIntCompare (line 1153) | class SafeIntCompare
class IntRegion (line 1174) | class IntRegion
type AbsMethod (line 1223) | enum AbsMethod
class GetAbsMethod (line 1231) | class GetAbsMethod
class AbsValueHelper (line 1246) | class AbsValueHelper
class AbsValueHelper<T, AbsMethodInt> (line 1249) | class AbsValueHelper<T, AbsMethodInt>
class AbsValueHelper<T, AbsMethodInt64> (line 1260) | class AbsValueHelper<T, AbsMethodInt64>
class AbsValueHelper<T, AbsMethodNoop> (line 1271) | class AbsValueHelper<T, AbsMethodNoop>
method T (line 1274) | static T Abs(T t) SAFEINT_NOTHROW
class NegationHelper (line 1283) | class NegationHelper
class NegationHelper<T, true> (line 1297) | class NegationHelper<T, true> // Signed
method T (line 1301) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1312) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
class SignedNegation (line 1328) | class SignedNegation
class SignedNegation<signed __int32> (line 1331) | class SignedNegation<signed __int32>
method Value (line 1334) | static signed __int32 Value(unsigned __int64 in) SAFEINT_NOTHROW
method Value (line 1339) | static signed __int32 Value(unsigned __int32 in) SAFEINT_NOTHROW {...
class SignedNegation<signed __int64> (line 1343) | class SignedNegation<signed __int64>
method Value (line 1346) | static signed __int64 Value(unsigned __int64 in) SAFEINT_NOTHROW {...
class NegationHelper<T, false> (line 1350) | class NegationHelper<T, false> // unsigned
method T (line 1354) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1376) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
type CastMethod (line 1393) | enum CastMethod
class GetCastMethod (line 1407) | class GetCastMethod
class GetCastMethod<float, FromType> (line 1441) | class GetCastMethod<float, FromType>
class GetCastMethod<double, FromType> (line 1451) | class GetCastMethod<double, FromType>
class GetCastMethod<long double, FromType> (line 1461) | class GetCastMethod<long double, FromType>
class GetCastMethod<ToType, float> (line 1471) | class GetCastMethod<ToType, float>
class GetCastMethod<ToType, double> (line 1481) | class GetCastMethod<ToType, double>
class GetCastMethod<ToType, long double> (line 1491) | class GetCastMethod<ToType, long double>
class SafeCastHelper (line 1501) | class SafeCastHelper
class SafeCastHelper<T, U, CastOK> (line 1504) | class SafeCastHelper<T, U, CastOK>
method Cast (line 1507) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1514) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastFromFloat> (line 1523) | class SafeCastHelper<T, U, CastFromFloat>
method Cast (line 1526) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1537) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, bool, CastFromBool> (line 1550) | class SafeCastHelper<T, bool, CastFromBool>
method Cast (line 1553) | static bool Cast(bool b, T& t) SAFEINT_NOTHROW
method CastThrow (line 1560) | static void CastThrow(bool b, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<bool, T, CastToBool> (line 1567) | class SafeCastHelper<bool, T, CastToBool>
method Cast (line 1570) | static bool Cast(T t, bool& b) SAFEINT_NOTHROW
method CastThrow (line 1577) | static void CastThrow(T t, bool& b) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckLTZero> (line 1584) | class SafeCastHelper<T, U, CastCheckLTZero>
method Cast (line 1587) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1596) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckGTMax> (line 1605) | class SafeCastHelper<T, U, CastCheckGTMax>
method Cast (line 1608) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1617) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned> (line 1626) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned>
method Cast (line 1629) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1639) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned> (line 1649) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned>
method Cast (line 1652) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1662) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
type ComparisonMethod (line 1672) | enum ComparisonMethod
class ValidComparison (line 1701) | class ValidComparison
class EqualityTest (line 1722) | class EqualityTest
class EqualityTest<T, U, ComparisonMethod_Ok> (line 1725) | class EqualityTest<T, U, ComparisonMethod_Ok>
method IsEquals (line 1728) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt> (line 1732) | class EqualityTest<T, U, ComparisonMethod_CastInt>
method IsEquals (line 1735) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt64> (line 1739) | class EqualityTest<T, U, ComparisonMethod_CastInt64>
method IsEquals (line 1742) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_UnsignedT> (line 1746) | class EqualityTest<T, U, ComparisonMethod_UnsignedT>
method IsEquals (line 1749) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class EqualityTest<T, U, ComparisonMethod_UnsignedU> (line 1760) | class EqualityTest<T, U, ComparisonMethod_UnsignedU>
method IsEquals (line 1763) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest (line 1774) | class GreaterThanTest
class GreaterThanTest<T, U, ComparisonMethod_Ok> (line 1777) | class GreaterThanTest<T, U, ComparisonMethod_Ok>
method GreaterThan (line 1780) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt> (line 1784) | class GreaterThanTest<T, U, ComparisonMethod_CastInt>
method GreaterThan (line 1787) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt64> (line 1791) | class GreaterThanTest<T, U, ComparisonMethod_CastInt64>
method GreaterThan (line 1794) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_UnsignedT> (line 1798) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedT>
method GreaterThan (line 1801) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest<T, U, ComparisonMethod_UnsignedU> (line 1812) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedU>
method GreaterThan (line 1815) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class ModulusHelper (line 1828) | class ModulusHelper
class ModulusHelper<T, U, ComparisonMethod_Ok> (line 1831) | class ModulusHelper<T, U, ComparisonMethod_Ok>
method SafeIntError (line 1834) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1855) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt> (line 1874) | class ModulusHelper<T, U, ComparisonMethod_CastInt>
method SafeIntError (line 1877) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1896) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt64> (line 1915) | class ModulusHelper<T, U, ComparisonMethod_CastInt64>
method SafeIntError (line 1918) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1937) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedT> (line 1956) | class ModulusHelper<T, U, ComparisonMethod_UnsignedT>
method SafeIntError (line 1959) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1974) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedU> (line 1988) | class ModulusHelper<T, U, ComparisonMethod_UnsignedU>
method SafeIntError (line 1991) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 2005) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
type MultiplicationState (line 2018) | enum MultiplicationState
class MultiplicationMethod (line 2040) | class MultiplicationMethod
class MultiplicationHelper (line 2114) | class MultiplicationHelper
class MultiplicationHelper<T, U, MultiplicationState_CastInt> (line 2117) | class MultiplicationHelper<T, U, MultiplicationState_CastInt>
method Multiply (line 2121) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2132) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint> (line 2143) | class MultiplicationHelper<T, U, MultiplicationState_CastUint>
method Multiply (line 2147) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2158) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastInt64> (line 2169) | class MultiplicationHelper<T, U, MultiplicationState_CastInt64>
method Multiply (line 2173) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2184) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint64> (line 2195) | class MultiplicationHelper<T, U, MultiplicationState_CastUint64>
method Multiply (line 2199) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2210) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class LargeIntRegMultiply (line 2223) | class LargeIntRegMultiply
function IntrinsicMultiplyUint64 (line 2227) | inline bool IntrinsicMultiplyUint64(const unsigned __int64& a,
function IntrinsicMultiplyInt64 (line 2237) | inline bool IntrinsicMultiplyInt64(const signed __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int64> (line 2269) | class LargeIntRegMultiply<unsigned __int64, unsigned __int64>
method RegMultiply (line 2272) | static bool RegMultiply(const unsigned __int64& a,
method RegMultiplyThrow (line 2333) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int32> (line 2394) | class LargeIntRegMultiply<unsigned __int64, unsigned __int32>
method RegMultiply (line 2397) | static bool RegMultiply(const unsigned __int64& a, unsigned __int3...
method RegMultiplyThrow (line 2436) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, signed __int32> (line 2478) | class LargeIntRegMultiply<unsigned __int64, signed __int32>
method RegMultiply (line 2482) | static bool RegMultiply(const unsigned __int64& a, signed __int32 ...
method RegMultiplyThrow (line 2494) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<unsigned __int64, signed __int64> (line 2508) | class LargeIntRegMultiply<unsigned __int64, signed __int64>
method RegMultiply (line 2511) | static bool RegMultiply(const unsigned __int64& a, signed __int64 ...
method RegMultiplyThrow (line 2523) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<signed __int32, unsigned __int64> (line 2537) | class LargeIntRegMultiply<signed __int32, unsigned __int64>
method RegMultiply (line 2541) | static bool RegMultiply(signed __int32 a, const unsigned __int64& ...
method RegMultiplyThrow (line 2589) | static void RegMultiplyThrow(signed __int32 a, const unsigned __in...
class LargeIntRegMultiply<unsigned __int32, unsigned __int64> (line 2635) | class LargeIntRegMultiply<unsigned __int32, unsigned __int64>
method RegMultiply (line 2639) | static bool RegMultiply(unsigned __int32 a, const unsigned __int64...
method RegMultiplyThrow (line 2659) | static void RegMultiplyThrow(unsigned __int32 a,
class LargeIntRegMultiply<unsigned __int32, signed __int64> (line 2675) | class LargeIntRegMultiply<unsigned __int32, signed __int64>
method RegMultiply (line 2678) | static bool RegMultiply(unsigned __int32 a, const signed __int64& ...
method RegMultiplyThrow (line 2685) | static void RegMultiplyThrow(unsigned __int32 a, const signed __in...
class LargeIntRegMultiply<signed __int64, signed __int64> (line 2695) | class LargeIntRegMultiply<signed __int64, signed __int64>
method RegMultiply (line 2698) | static bool RegMultiply(const signed __int64& a, const signed __in...
method RegMultiplyThrow (line 2751) | static void RegMultiplyThrow(const signed __int64& a,
class LargeIntRegMultiply<signed __int64, unsigned __int32> (line 2806) | class LargeIntRegMultiply<signed __int64, unsigned __int32>
method RegMultiply (line 2809) | static bool RegMultiply(const signed __int64& a, unsigned __int32 ...
method RegMultiplyThrow (line 2852) | static void RegMultiplyThrow(const signed __int64& a, unsigned __i...
class LargeIntRegMultiply<signed __int64, signed __int32> (line 2896) | class LargeIntRegMultiply<signed __int64, signed __int32>
method RegMultiply (line 2899) | static bool RegMultiply(const signed __int64& a, signed __int32 b,...
method RegMultiplyThrow (line 2952) | static void RegMultiplyThrow(signed __int64 a, signed __int32 b, s...
class LargeIntRegMultiply<signed __int32, signed __int64> (line 3003) | class LargeIntRegMultiply<signed __int32, signed __int64>
method RegMultiply (line 3006) | static bool RegMultiply(signed __int32 a, const signed __int64& b,...
method RegMultiplyThrow (line 3070) | static void RegMultiplyThrow(signed __int32 a, const signed __int6...
class LargeIntRegMultiply<signed __int64, unsigned __int64> (line 3134) | class LargeIntRegMultiply<signed __int64, unsigned __int64>
method RegMultiply (line 3138) | static bool RegMultiply(const signed __int64& a, const unsigned __...
method RegMultiplyThrow (line 3179) | static void RegMultiplyThrow(const signed __int64& a,
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64> (line 3227) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64>
method Multiply (line 3231) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3241) | static void MultiplyThrow(const unsigned __int64& t, const unsigne...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint> (line 3252) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint>
method Multiply (line 3257) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3266) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintUint64> (line 3277) | class MultiplicationHelper<T, U, MultiplicationState_UintUint64>
method Multiply (line 3282) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3298) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int> (line 3311) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int>
method Multiply (line 3316) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3325) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64> (line 3335) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64>
method Multiply (line 3340) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3350) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintInt64> (line 3361) | class MultiplicationHelper<T, U, MultiplicationState_UintInt64>
method Multiply (line 3366) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3382) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint> (line 3395) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint>
method Multiply (line 3400) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3409) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int64> (line 3419) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int64>
method Multiply (line 3423) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3432) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int> (line 3442) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int>
method Multiply (line 3447) | static bool Multiply(const T& t, U u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3455) | static void MultiplyThrow(const __int64& t, U u, T& ret) SAFEINT_C...
class MultiplicationHelper<T, U, MultiplicationState_IntUint64> (line 3465) | class MultiplicationHelper<T, U, MultiplicationState_IntUint64>
method Multiply (line 3470) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3486) | static void MultiplyThrow(T t, const unsigned __int64& u, T& ret) ...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64> (line 3498) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64>
method Multiply (line 3503) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3512) | static void MultiplyThrow(const __int64& t, const unsigned __int64...
class MultiplicationHelper<T, U, MultiplicationState_IntInt64> (line 3523) | class MultiplicationHelper<T, U, MultiplicationState_IntInt64>
method Multiply (line 3528) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3544) | static void MultiplyThrow(T t, const U& u, T& ret) SAFEINT_CPP_THROW
type DivisionState (line 3555) | enum DivisionState
class DivisionMethod (line 3566) | class DivisionMethod
class DivisionHelper (line 3586) | class DivisionHelper
class DivisionHelper<T, U, DivisionState_OK> (line 3589) | class DivisionHelper<T, U, DivisionState_OK>
method SafeIntError (line 3592) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3607) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_UnsignedSigned> (line 3622) | class DivisionHelper<T, U, DivisionState_UnsignedSigned>
method SafeIntError (line 3625) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3653) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned32> (line 3682) | class DivisionHelper<T, U, DivisionState_SignedUnsigned32>
method SafeIntError (line 3685) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3708) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned64> (line 3733) | class DivisionHelper<T, U, DivisionState_SignedUnsigned64>
method SafeIntError (line 3736) | static SafeIntError Divide(const T& t, const unsigned __int64& u, ...
method DivideThrow (line 3773) | static void DivideThrow(const T& t, const unsigned __int64& u, T& ...
class DivisionHelper<T, U, DivisionState_SignedUnsigned> (line 3810) | class DivisionHelper<T, U, DivisionState_SignedUnsigned>
method SafeIntError (line 3815) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3833) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedSigned> (line 3851) | class DivisionHelper<T, U, DivisionState_SignedSigned>
method SafeIntError (line 3854) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3875) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
type AdditionState (line 3895) | enum AdditionState
class AdditionMethod (line 3916) | class AdditionMethod
class AdditionHelper (line 3985) | class AdditionHelper
class AdditionHelper<T, U, AdditionState_CastIntCheckMax> (line 3988) | class AdditionHelper<T, U, AdditionState_CastIntCheckMax>
method Addition (line 3991) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4006) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow> (line 4022) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow>
method Addition (line 4025) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4040) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax> (line 4056) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax>
method Addition (line 4059) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4074) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow> (line 4090) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow>
method Addition (line 4093) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4109) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax> (line 4126) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax>
method Addition (line 4129) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4145) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax> (line 4162) | class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax>
method Addition (line 4165) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4180) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax> (line 4196) | class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax>
method Addition (line 4199) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4214) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckMax> (line 4230) | class AdditionHelper<T, U, AdditionState_CastInt64CheckMax>
method Addition (line 4233) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4248) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax> (line 4264) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax>
method Addition (line 4267) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4300) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2> (line 4334) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2>
method Addition (line 4337) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4365) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow> (line 4394) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow>
method Addition (line 4397) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4418) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeIntMinMax> (line 4439) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeI...
method Addition (line 4442) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4459) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax> (line 4478) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax>
method Addition (line 4481) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4496) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64> (line 4514) | class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64>
method Addition (line 4517) | static bool Addition(const __int64& lhs, const unsigned __int64& r...
method AdditionThrow (line 4535) | static void AdditionThrow(const __int64& lhs, const unsigned __int...
class AdditionHelper<T, U, AdditionState_ManualCheck> (line 4552) | class AdditionHelper<T, U, AdditionState_ManualCheck>
method Addition (line 4555) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4574) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
type SubtractionState (line 4595) | enum SubtractionState
class SubtractionMethod (line 4624) | class SubtractionMethod
class SubtractionMethod2 (line 4675) | class SubtractionMethod2
class SubtractionHelper (line 4725) | class SubtractionHelper
class SubtractionHelper<T, U, SubtractionState_BothUnsigned> (line 4728) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned>
method Subtract (line 4731) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4744) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_BothUnsigned2> (line 4758) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned2>
method Subtract (line 4761) | static bool Subtract(const T& lhs, const U& rhs, U& result) SAFEIN...
method SubtractThrow (line 4775) | static void SubtractThrow(const T& lhs, const U& rhs, U& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMinMax> (line 4790) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4793) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4809) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMinMax2> (line 4820) | class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4823) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4833) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin> (line 4844) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin>
method Subtract (line 4847) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4863) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeIntMinMax> (line 4880) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4883) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4893) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeIntMinMax2> (line 4904) | class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4907) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4917) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin> (line 4928) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin>
method Subtract (line 4931) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4947) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Uint64Int> (line 4964) | class SubtractionHelper<T, U, SubtractionState_Uint64Int>
method Subtract (line 4967) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4992) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Uint64Int2> (line 5018) | class SubtractionHelper<U, T, SubtractionState_Uint64Int2>
method Subtract (line 5021) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5062) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_UintInt64> (line 5104) | class SubtractionHelper<T, U, SubtractionState_UintInt64>
method Subtract (line 5107) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5138) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_UintInt642> (line 5170) | class SubtractionHelper<U, T, SubtractionState_UintInt642>
method Subtract (line 5173) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5199) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Int> (line 5226) | class SubtractionHelper<T, U, SubtractionState_Int64Int>
method Subtract (line 5229) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5255) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Int2> (line 5281) | class SubtractionHelper<U, T, SubtractionState_Int64Int2>
method Subtract (line 5284) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5319) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntInt64> (line 5356) | class SubtractionHelper<T, U, SubtractionState_IntInt64>
method Subtract (line 5359) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5419) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntInt642> (line 5480) | class SubtractionHelper<U, T, SubtractionState_IntInt642>
method Subtract (line 5483) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5499) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint> (line 5515) | class SubtractionHelper<T, U, SubtractionState_Int64Uint>
method Subtract (line 5518) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5534) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Uint2> (line 5551) | class SubtractionHelper<U, T, SubtractionState_Int64Uint2>
method Subtract (line 5555) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5570) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntUint64> (line 5586) | class SubtractionHelper<T, U, SubtractionState_IntUint64>
method Subtract (line 5589) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5619) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntUint642> (line 5650) | class SubtractionHelper<U, T, SubtractionState_IntUint642>
method Subtract (line 5653) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5666) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint64> (line 5680) | class SubtractionHelper<T, U, SubtractionState_Int64Uint64>
method Subtract (line 5683) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5699) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
class SubtractionHelper<U, T, SubtractionState_Int64Uint642> (line 5717) | class SubtractionHelper<U, T, SubtractionState_Int64Uint642>
method Subtract (line 5722) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5735) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
type BinaryState (line 5748) | enum BinaryState
class BinaryMethod (line 5757) | class BinaryMethod
class BinaryAndHelper (line 5780) | class BinaryAndHelper
class BinaryAndHelper<T, U, BinaryState_OK> (line 5783) | class BinaryAndHelper<T, U, BinaryState_OK>
method T (line 5786) | static T And(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs & rhs); }
class BinaryAndHelper<T, U, BinaryState_Int8> (line 5790) | class BinaryAndHelper<T, U, BinaryState_Int8>
method T (line 5793) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int16> (line 5802) | class BinaryAndHelper<T, U, BinaryState_Int16>
method T (line 5805) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int32> (line 5814) | class BinaryAndHelper<T, U, BinaryState_Int32>
method T (line 5817) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper (line 5826) | class BinaryOrHelper
class BinaryOrHelper<T, U, BinaryState_OK> (line 5829) | class BinaryOrHelper<T, U, BinaryState_OK>
method T (line 5832) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs | rhs); }
class BinaryOrHelper<T, U, BinaryState_Int8> (line 5836) | class BinaryOrHelper<T, U, BinaryState_Int8>
method T (line 5839) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int16> (line 5848) | class BinaryOrHelper<T, U, BinaryState_Int16>
method T (line 5851) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int32> (line 5860) | class BinaryOrHelper<T, U, BinaryState_Int32>
method T (line 5863) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper (line 5872) | class BinaryXorHelper
class BinaryXorHelper<T, U, BinaryState_OK> (line 5875) | class BinaryXorHelper<T, U, BinaryState_OK>
method T (line 5878) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs ^ rhs); }
class BinaryXorHelper<T, U, BinaryState_Int8> (line 5882) | class BinaryXorHelper<T, U, BinaryState_Int8>
method T (line 5885) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int16> (line 5894) | class BinaryXorHelper<T, U, BinaryState_Int16>
method T (line 5897) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int32> (line 5906) | class BinaryXorHelper<T, U, BinaryState_Int32>
method T (line 5909) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
function SafeCast (line 5923) | inline bool SafeCast(const T From, U& To) SAFEINT_NOTHROW
function SafeEquals (line 5929) | inline bool SafeEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeNotEquals (line 5935) | inline bool SafeNotEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThan (line 5941) | inline bool SafeGreaterThan(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThanEquals (line 5947) | inline bool SafeGreaterThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThan (line 5953) | inline bool SafeLessThan(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThanEquals (line 5959) | inline bool SafeLessThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeModulus (line 5965) | inline bool SafeModulus(const T& t, const U& u, T& result) SAFEINT_N...
function SafeMultiply (line 5971) | inline bool SafeMultiply(T t, U u, T& result) SAFEINT_NOTHROW
function SafeDivide (line 5977) | inline bool SafeDivide(T t, U u, T& result) SAFEINT_NOTHROW
function SafeAdd (line 5983) | inline bool SafeAdd(T t, U u, T& result) SAFEINT_NOTHROW
function SafeSubtract (line 5989) | inline bool SafeSubtract(T t, U u, T& result) SAFEINT_NOTHROW
class SafeInt (line 5999) | class SafeInt
method SafeInt (line 6002) | SafeInt() SAFEINT_NOTHROW
method SafeInt (line 6011) | SafeInt(const T& i) SAFEINT_NOTHROW
method SafeInt (line 6019) | SafeInt(bool b) SAFEINT_NOTHROW
method SafeInt (line 6025) | constexpr SafeInt(const SafeInt<T, E>& u) SAFEINT_CPP_THROW = defa...
method SafeInt (line 6028) | SafeInt(const SafeInt<U, E>& u) SAFEINT_CPP_THROW
method SafeInt (line 6035) | SafeInt(const U& i) SAFEINT_CPP_THROW
method T (line 6213) | T* Ptr() SAFEINT_NOTHROW { return &m_int; }
method T (line 6214) | const T* Ptr() const SAFEINT_NOTHROW { return &m_int; }
method T (line 6215) | const T& Ref() const SAFEINT_NOTHROW { return m_int; }
method T (line 6222) | T* operator&() SAFEINT_NOTHROW { return &m_int; }
method T (line 6223) | const T* operator&() const SAFEINT_NOTHROW { return &m_int; }
method Min (line 6724) | SafeInt<T, E> Min(SafeInt<T, E> test, const T floor = IntTraits<T>...
method Max (line 6730) | SafeInt<T, E> Max(SafeInt<T, E> test, const T upper = IntTraits<T>...
method Swap (line 6736) | void Swap(SafeInt<T, E>& with) SAFEINT_NOTHROW
method SafeAtoI (line 6743) | static SafeInt<T, E> SafeAtoI(const char* input) SAFEINT_CPP_THROW...
method SafeWtoI (line 6745) | static SafeInt<T, E> SafeWtoI(const wchar_t* input) { return SafeT...
type alignBits (line 6747) | enum alignBits
method SafeTtoI (line 6798) | static SafeInt<T, E> SafeTtoI(U* input) SAFEINT_CPP_THROW
function SafePtrDiff (line 6839) | SafeInt<ptrdiff_t, SafeIntDefaultExceptionHandler> SafePtrDiff(const...
class ModulusSimpleCaseHelper (line 6986) | class ModulusSimpleCaseHelper
class ModulusSignedCaseHelper (line 6989) | class ModulusSignedCaseHelper
class ModulusSignedCaseHelper<T, E, true> (line 6992) | class ModulusSignedCaseHelper<T, E, true>
method SignedCase (line 6995) | static bool SignedCase(SafeInt<T, E> rhs, SafeInt<T, E>& result) S...
class ModulusSignedCaseHelper<T, E, false> (line 7007) | class ModulusSignedCaseHelper<T, E, false>
method SignedCase (line 7010) | static bool SignedCase(SafeInt<T, E> /*rhs*/, SafeInt<T, E>& /*res...
class ModulusSimpleCaseHelper<T, U, E, true> (line 7014) | class ModulusSimpleCaseHelper<T, U, E, true>
method ModulusSimpleCase (line 7017) | static bool ModulusSimpleCase(U lhs, SafeInt<T, E> rhs, SafeInt<T,...
class ModulusSimpleCaseHelper<T, U, E, false> (line 7032) | class ModulusSimpleCaseHelper<T, U, E, false>
method ModulusSimpleCase (line 7035) | static bool ModulusSimpleCase(U /*lhs*/, SafeInt<T, E> /*rhs*/, Sa...
class DivisionNegativeCornerCaseHelper (line 7073) | class DivisionNegativeCornerCaseHelper
class DivisionNegativeCornerCaseHelper<T, U, E, true> (line 7076) | class DivisionNegativeCornerCaseHelper<T, U, E, true>
method NegativeCornerCase (line 7079) | static bool NegativeCornerCase(U lhs, SafeInt<T, E> rhs, SafeInt<T...
class DivisionNegativeCornerCaseHelper<T, U, E, false> (line 7111) | class DivisionNegativeCornerCaseHelper<T, U, E, false>
method NegativeCornerCase (line 7114) | static bool NegativeCornerCase(U /*lhs*/, SafeInt<T, E> /*rhs*/, S...
class DivisionCornerCaseHelper (line 7121) | class DivisionCornerCaseHelper
class DivisionCornerCaseHelper<T, U, E, true> (line 7124) | class DivisionCornerCaseHelper<T, U, E, true>
method DivisionCornerCase1 (line 7127) | static bool DivisionCornerCase1(U lhs, SafeInt<T, E> rhs, SafeInt<...
class DivisionCornerCaseHelper<T, U, E, false> (line 7153) | class DivisionCornerCaseHelper<T, U, E, false>
method DivisionCornerCase1 (line 7156) | static bool DivisionCornerCase1(U /*lhs*/, SafeInt<T, E> /*rhs*/, ...
class DivisionCornerCaseHelper2 (line 7163) | class DivisionCornerCaseHelper2
class DivisionCornerCaseHelper2<T, U, E, true> (line 7166) | class DivisionCornerCaseHelper2<T, U, E, true>
method DivisionCornerCase2 (line 7169) | static bool DivisionCornerCase2(U lhs, SafeInt<T, E> rhs, SafeInt<...
class DivisionCornerCaseHelper2<T, U, E, false> (line 7201) | class DivisionCornerCaseHelper2<T, U, E, false>
method DivisionCornerCase2 (line 7204) | static bool DivisionCornerCase2(U /*lhs*/, SafeInt<T, E> /*rhs*/, ...
function T (line 7252) | T& operator+=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7261) | T& operator-=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7270) | T& operator*=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7279) | T& operator/=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7288) | T& operator%=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7297) | T& operator&=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7304) | T& operator^=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7311) | T& operator|=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7318) | T& operator<<=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7325) | T& operator>>=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7336) | T*& operator+=(T*& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7349) | T*& operator-=(T*& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7359) | T*& operator*=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7367) | T*& operator/=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7375) | T*& operator%=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7383) | T*& operator&=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7391) | T*& operator^=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7399) | T*& operator|=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7407) | T*& operator<<=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7415) | T*& operator>>=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
type msl (line 636) | namespace msl
type safeint3 (line 544) | namespace safeint3
type SafeIntError (line 550) | enum SafeIntError
function SafeIntExceptionAssert (line 648) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW { SAFEINT_ASSER...
function SafeIntExceptionAssert (line 650) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW {}
function SafeIntException (line 665) | class SAFEINT_VISIBLE SafeIntException
type SafeIntInternal (line 673) | namespace SafeIntInternal
class SafeIntExceptionHandler (line 681) | class SafeIntExceptionHandler
class SafeIntExceptionHandler<SafeIntException> (line 684) | class SafeIntExceptionHandler<SafeIntException>
method SAFEINT_STDCALL (line 687) | SAFEINT_STDCALL SafeIntOnOverflow()
method SAFEINT_STDCALL (line 693) | SAFEINT_STDCALL SafeIntOnDivZero()
class SafeInt_InvalidParameter (line 708) | class SafeInt_InvalidParameter
method SAFEINT_NORETURN (line 711) | static SAFEINT_NORETURN void SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_NORETURN (line 717) | static SAFEINT_NORETURN void SafeIntOnDivZero() SAFEINT_NOTHROW
class SafeIntWin32ExceptionHandler (line 726) | class SafeIntWin32ExceptionHandler
method SAFEINT_STDCALL (line 729) | SAFEINT_STDCALL SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_STDCALL (line 735) | SAFEINT_STDCALL SafeIntOnDivZero() SAFEINT_NOTHROW
class CompileConst (line 799) | class CompileConst
class CompileConst<true> (line 801) | class CompileConst<true>
class CompileConst<false> (line 807) | class CompileConst<false>
class NumericType (line 822) | class NumericType
class NumericType<bool> (line 827) | class NumericType<bool>
class NumericType (line 838) | class NumericType
class NumericType<bool> (line 855) | class NumericType<bool>
class NumericType<char> (line 866) | class NumericType<char>
class NumericType<unsigned char> (line 877) | class NumericType<unsigned char>
class NumericType<signed char> (line 888) | class NumericType<signed char>
class NumericType<short> (line 899) | class NumericType<short>
class NumericType<unsigned short> (line 910) | class NumericType<unsigned short>
class NumericType<wchar_t> (line 922) | class NumericType<wchar_t>
class NumericType<int> (line 934) | class NumericType<int>
class NumericType<unsigned int> (line 945) | class NumericType<unsigned int>
class NumericType<long> (line 956) | class NumericType<long>
class NumericType<unsigned long> (line 967) | class NumericType<unsigned long>
class NumericType<__int64> (line 978) | class NumericType<__int64>
class NumericType<unsigned __int64> (line 989) | class NumericType<unsigned __int64>
class NumericType<float> (line 1000) | class NumericType<float>
class NumericType<double> (line 1011) | class NumericType<double>
class NumericType<long double> (line 1022) | class NumericType<long double>
class NumericType (line 1034) | class NumericType
class SafeIntMinMax (line 1054) | class SafeIntMinMax
class SafeIntMinMax<true, 8> (line 1057) | class SafeIntMinMax<true, 8>
class SafeIntMinMax<true, 16> (line 1064) | class SafeIntMinMax<true, 16>
class SafeIntMinMax<true, 32> (line 1071) | class SafeIntMinMax<true, 32>
class SafeIntMinMax<true, 64> (line 1078) | class SafeIntMinMax<true, 64>
class SafeIntMinMax<false, 8> (line 1086) | class SafeIntMinMax<false, 8>
class SafeIntMinMax<false, 16> (line 1093) | class SafeIntMinMax<false, 16>
class SafeIntMinMax<false, 32> (line 1100) | class SafeIntMinMax<false, 32>
class SafeIntMinMax<false, 64> (line 1107) | class SafeIntMinMax<false, 64>
class IntTraits (line 1115) | class IntTraits
class SafeIntCompare (line 1153) | class SafeIntCompare
class IntRegion (line 1174) | class IntRegion
type AbsMethod (line 1223) | enum AbsMethod
class GetAbsMethod (line 1231) | class GetAbsMethod
class AbsValueHelper (line 1246) | class AbsValueHelper
class AbsValueHelper<T, AbsMethodInt> (line 1249) | class AbsValueHelper<T, AbsMethodInt>
class AbsValueHelper<T, AbsMethodInt64> (line 1260) | class AbsValueHelper<T, AbsMethodInt64>
class AbsValueHelper<T, AbsMethodNoop> (line 1271) | class AbsValueHelper<T, AbsMethodNoop>
method T (line 1274) | static T Abs(T t) SAFEINT_NOTHROW
class NegationHelper (line 1283) | class NegationHelper
class NegationHelper<T, true> (line 1297) | class NegationHelper<T, true> // Signed
method T (line 1301) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1312) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
class SignedNegation (line 1328) | class SignedNegation
class SignedNegation<signed __int32> (line 1331) | class SignedNegation<signed __int32>
method Value (line 1334) | static signed __int32 Value(unsigned __int64 in) SAFEINT_NOTHROW
method Value (line 1339) | static signed __int32 Value(unsigned __int32 in) SAFEINT_NOTHROW {...
class SignedNegation<signed __int64> (line 1343) | class SignedNegation<signed __int64>
method Value (line 1346) | static signed __int64 Value(unsigned __int64 in) SAFEINT_NOTHROW {...
class NegationHelper<T, false> (line 1350) | class NegationHelper<T, false> // unsigned
method T (line 1354) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1376) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
type CastMethod (line 1393) | enum CastMethod
class GetCastMethod (line 1407) | class GetCastMethod
class GetCastMethod<float, FromType> (line 1441) | class GetCastMethod<float, FromType>
class GetCastMethod<double, FromType> (line 1451) | class GetCastMethod<double, FromType>
class GetCastMethod<long double, FromType> (line 1461) | class GetCastMethod<long double, FromType>
class GetCastMethod<ToType, float> (line 1471) | class GetCastMethod<ToType, float>
class GetCastMethod<ToType, double> (line 1481) | class GetCastMethod<ToType, double>
class GetCastMethod<ToType, long double> (line 1491) | class GetCastMethod<ToType, long double>
class SafeCastHelper (line 1501) | class SafeCastHelper
class SafeCastHelper<T, U, CastOK> (line 1504) | class SafeCastHelper<T, U, CastOK>
method Cast (line 1507) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1514) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastFromFloat> (line 1523) | class SafeCastHelper<T, U, CastFromFloat>
method Cast (line 1526) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1537) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, bool, CastFromBool> (line 1550) | class SafeCastHelper<T, bool, CastFromBool>
method Cast (line 1553) | static bool Cast(bool b, T& t) SAFEINT_NOTHROW
method CastThrow (line 1560) | static void CastThrow(bool b, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<bool, T, CastToBool> (line 1567) | class SafeCastHelper<bool, T, CastToBool>
method Cast (line 1570) | static bool Cast(T t, bool& b) SAFEINT_NOTHROW
method CastThrow (line 1577) | static void CastThrow(T t, bool& b) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckLTZero> (line 1584) | class SafeCastHelper<T, U, CastCheckLTZero>
method Cast (line 1587) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1596) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckGTMax> (line 1605) | class SafeCastHelper<T, U, CastCheckGTMax>
method Cast (line 1608) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1617) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned> (line 1626) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned>
method Cast (line 1629) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1639) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned> (line 1649) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned>
method Cast (line 1652) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1662) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
type ComparisonMethod (line 1672) | enum ComparisonMethod
class ValidComparison (line 1701) | class ValidComparison
class EqualityTest (line 1722) | class EqualityTest
class EqualityTest<T, U, ComparisonMethod_Ok> (line 1725) | class EqualityTest<T, U, ComparisonMethod_Ok>
method IsEquals (line 1728) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt> (line 1732) | class EqualityTest<T, U, ComparisonMethod_CastInt>
method IsEquals (line 1735) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt64> (line 1739) | class EqualityTest<T, U, ComparisonMethod_CastInt64>
method IsEquals (line 1742) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_UnsignedT> (line 1746) | class EqualityTest<T, U, ComparisonMethod_UnsignedT>
method IsEquals (line 1749) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class EqualityTest<T, U, ComparisonMethod_UnsignedU> (line 1760) | class EqualityTest<T, U, ComparisonMethod_UnsignedU>
method IsEquals (line 1763) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest (line 1774) | class GreaterThanTest
class GreaterThanTest<T, U, ComparisonMethod_Ok> (line 1777) | class GreaterThanTest<T, U, ComparisonMethod_Ok>
method GreaterThan (line 1780) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt> (line 1784) | class GreaterThanTest<T, U, ComparisonMethod_CastInt>
method GreaterThan (line 1787) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt64> (line 1791) | class GreaterThanTest<T, U, ComparisonMethod_CastInt64>
method GreaterThan (line 1794) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_UnsignedT> (line 1798) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedT>
method GreaterThan (line 1801) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest<T, U, ComparisonMethod_UnsignedU> (line 1812) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedU>
method GreaterThan (line 1815) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class ModulusHelper (line 1828) | class ModulusHelper
class ModulusHelper<T, U, ComparisonMethod_Ok> (line 1831) | class ModulusHelper<T, U, ComparisonMethod_Ok>
method SafeIntError (line 1834) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1855) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt> (line 1874) | class ModulusHelper<T, U, ComparisonMethod_CastInt>
method SafeIntError (line 1877) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1896) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt64> (line 1915) | class ModulusHelper<T, U, ComparisonMethod_CastInt64>
method SafeIntError (line 1918) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1937) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedT> (line 1956) | class ModulusHelper<T, U, ComparisonMethod_UnsignedT>
method SafeIntError (line 1959) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1974) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedU> (line 1988) | class ModulusHelper<T, U, ComparisonMethod_UnsignedU>
method SafeIntError (line 1991) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 2005) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
type MultiplicationState (line 2018) | enum MultiplicationState
class MultiplicationMethod (line 2040) | class MultiplicationMethod
class MultiplicationHelper (line 2114) | class MultiplicationHelper
class MultiplicationHelper<T, U, MultiplicationState_CastInt> (line 2117) | class MultiplicationHelper<T, U, MultiplicationState_CastInt>
method Multiply (line 2121) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2132) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint> (line 2143) | class MultiplicationHelper<T, U, MultiplicationState_CastUint>
method Multiply (line 2147) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2158) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastInt64> (line 2169) | class MultiplicationHelper<T, U, MultiplicationState_CastInt64>
method Multiply (line 2173) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2184) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint64> (line 2195) | class MultiplicationHelper<T, U, MultiplicationState_CastUint64>
method Multiply (line 2199) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2210) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class LargeIntRegMultiply (line 2223) | class LargeIntRegMultiply
function IntrinsicMultiplyUint64 (line 2227) | inline bool IntrinsicMultiplyUint64(const unsigned __int64& a,
function IntrinsicMultiplyInt64 (line 2237) | inline bool IntrinsicMultiplyInt64(const signed __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int64> (line 2269) | class LargeIntRegMultiply<unsigned __int64, unsigned __int64>
method RegMultiply (line 2272) | static bool RegMultiply(const unsigned __int64& a,
method RegMultiplyThrow (line 2333) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int32> (line 2394) | class LargeIntRegMultiply<unsigned __int64, unsigned __int32>
method RegMultiply (line 2397) | static bool RegMultiply(const unsigned __int64& a, unsigned __int3...
method RegMultiplyThrow (line 2436) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, signed __int32> (line 2478) | class LargeIntRegMultiply<unsigned __int64, signed __int32>
method RegMultiply (line 2482) | static bool RegMultiply(const unsigned __int64& a, signed __int32 ...
method RegMultiplyThrow (line 2494) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<unsigned __int64, signed __int64> (line 2508) | class LargeIntRegMultiply<unsigned __int64, signed __int64>
method RegMultiply (line 2511) | static bool RegMultiply(const unsigned __int64& a, signed __int64 ...
method RegMultiplyThrow (line 2523) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<signed __int32, unsigned __int64> (line 2537) | class LargeIntRegMultiply<signed __int32, unsigned __int64>
method RegMultiply (line 2541) | static bool RegMultiply(signed __int32 a, const unsigned __int64& ...
method RegMultiplyThrow (line 2589) | static void RegMultiplyThrow(signed __int32 a, const unsigned __in...
class LargeIntRegMultiply<unsigned __int32, unsigned __int64> (line 2635) | class LargeIntRegMultiply<unsigned __int32, unsigned __int64>
method RegMultiply (line 2639) | static bool RegMultiply(unsigned __int32 a, const unsigned __int64...
method RegMultiplyThrow (line 2659) | static void RegMultiplyThrow(unsigned __int32 a,
class LargeIntRegMultiply<unsigned __int32, signed __int64> (line 2675) | class LargeIntRegMultiply<unsigned __int32, signed __int64>
method RegMultiply (line 2678) | static bool RegMultiply(unsigned __int32 a, const signed __int64& ...
method RegMultiplyThrow (line 2685) | static void RegMultiplyThrow(unsigned __int32 a, const signed __in...
class LargeIntRegMultiply<signed __int64, signed __int64> (line 2695) | class LargeIntRegMultiply<signed __int64, signed __int64>
method RegMultiply (line 2698) | static bool RegMultiply(const signed __int64& a, const signed __in...
method RegMultiplyThrow (line 2751) | static void RegMultiplyThrow(const signed __int64& a,
class LargeIntRegMultiply<signed __int64, unsigned __int32> (line 2806) | class LargeIntRegMultiply<signed __int64, unsigned __int32>
method RegMultiply (line 2809) | static bool RegMultiply(const signed __int64& a, unsigned __int32 ...
method RegMultiplyThrow (line 2852) | static void RegMultiplyThrow(const signed __int64& a, unsigned __i...
class LargeIntRegMultiply<signed __int64, signed __int32> (line 2896) | class LargeIntRegMultiply<signed __int64, signed __int32>
method RegMultiply (line 2899) | static bool RegMultiply(const signed __int64& a, signed __int32 b,...
method RegMultiplyThrow (line 2952) | static void RegMultiplyThrow(signed __int64 a, signed __int32 b, s...
class LargeIntRegMultiply<signed __int32, signed __int64> (line 3003) | class LargeIntRegMultiply<signed __int32, signed __int64>
method RegMultiply (line 3006) | static bool RegMultiply(signed __int32 a, const signed __int64& b,...
method RegMultiplyThrow (line 3070) | static void RegMultiplyThrow(signed __int32 a, const signed __int6...
class LargeIntRegMultiply<signed __int64, unsigned __int64> (line 3134) | class LargeIntRegMultiply<signed __int64, unsigned __int64>
method RegMultiply (line 3138) | static bool RegMultiply(const signed __int64& a, const unsigned __...
method RegMultiplyThrow (line 3179) | static void RegMultiplyThrow(const signed __int64& a,
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64> (line 3227) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64>
method Multiply (line 3231) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3241) | static void MultiplyThrow(const unsigned __int64& t, const unsigne...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint> (line 3252) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint>
method Multiply (line 3257) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3266) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintUint64> (line 3277) | class MultiplicationHelper<T, U, MultiplicationState_UintUint64>
method Multiply (line 3282) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3298) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int> (line 3311) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int>
method Multiply (line 3316) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3325) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64> (line 3335) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64>
method Multiply (line 3340) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3350) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintInt64> (line 3361) | class MultiplicationHelper<T, U, MultiplicationState_UintInt64>
method Multiply (line 3366) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3382) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint> (line 3395) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint>
method Multiply (line 3400) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3409) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int64> (line 3419) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int64>
method Multiply (line 3423) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3432) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int> (line 3442) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int>
method Multiply (line 3447) | static bool Multiply(const T& t, U u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3455) | static void MultiplyThrow(const __int64& t, U u, T& ret) SAFEINT_C...
class MultiplicationHelper<T, U, MultiplicationState_IntUint64> (line 3465) | class MultiplicationHelper<T, U, MultiplicationState_IntUint64>
method Multiply (line 3470) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3486) | static void MultiplyThrow(T t, const unsigned __int64& u, T& ret) ...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64> (line 3498) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64>
method Multiply (line 3503) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3512) | static void MultiplyThrow(const __int64& t, const unsigned __int64...
class MultiplicationHelper<T, U, MultiplicationState_IntInt64> (line 3523) | class MultiplicationHelper<T, U, MultiplicationState_IntInt64>
method Multiply (line 3528) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3544) | static void MultiplyThrow(T t, const U& u, T& ret) SAFEINT_CPP_THROW
type DivisionState (line 3555) | enum DivisionState
class DivisionMethod (line 3566) | class DivisionMethod
class DivisionHelper (line 3586) | class DivisionHelper
class DivisionHelper<T, U, DivisionState_OK> (line 3589) | class DivisionHelper<T, U, DivisionState_OK>
method SafeIntError (line 3592) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3607) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_UnsignedSigned> (line 3622) | class DivisionHelper<T, U, DivisionState_UnsignedSigned>
method SafeIntError (line 3625) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3653) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned32> (line 3682) | class DivisionHelper<T, U, DivisionState_SignedUnsigned32>
method SafeIntError (line 3685) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3708) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned64> (line 3733) | class DivisionHelper<T, U, DivisionState_SignedUnsigned64>
method SafeIntError (line 3736) | static SafeIntError Divide(const T& t, const unsigned __int64& u, ...
method DivideThrow (line 3773) | static void DivideThrow(const T& t, const unsigned __int64& u, T& ...
class DivisionHelper<T, U, DivisionState_SignedUnsigned> (line 3810) | class DivisionHelper<T, U, DivisionState_SignedUnsigned>
method SafeIntError (line 3815) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3833) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedSigned> (line 3851) | class DivisionHelper<T, U, DivisionState_SignedSigned>
method SafeIntError (line 3854) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3875) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
type AdditionState (line 3895) | enum AdditionState
class AdditionMethod (line 3916) | class AdditionMethod
class AdditionHelper (line 3985) | class AdditionHelper
class AdditionHelper<T, U, AdditionState_CastIntCheckMax> (line 3988) | class AdditionHelper<T, U, AdditionState_CastIntCheckMax>
method Addition (line 3991) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4006) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow> (line 4022) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow>
method Addition (line 4025) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4040) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax> (line 4056) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax>
method Addition (line 4059) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4074) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow> (line 4090) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow>
method Addition (line 4093) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4109) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax> (line 4126) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax>
method Addition (line 4129) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4145) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax> (line 4162) | class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax>
method Addition (line 4165) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4180) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax> (line 4196) | class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax>
method Addition (line 4199) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4214) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckMax> (line 4230) | class AdditionHelper<T, U, AdditionState_CastInt64CheckMax>
method Addition (line 4233) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4248) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax> (line 4264) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax>
method Addition (line 4267) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4300) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2> (line 4334) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2>
method Addition (line 4337) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4365) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow> (line 4394) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow>
method Addition (line 4397) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4418) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeIntMinMax> (line 4439) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeI...
method Addition (line 4442) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4459) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax> (line 4478) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax>
method Addition (line 4481) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4496) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64> (line 4514) | class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64>
method Addition (line 4517) | static bool Addition(const __int64& lhs, const unsigned __int64& r...
method AdditionThrow (line 4535) | static void AdditionThrow(const __int64& lhs, const unsigned __int...
class AdditionHelper<T, U, AdditionState_ManualCheck> (line 4552) | class AdditionHelper<T, U, AdditionState_ManualCheck>
method Addition (line 4555) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4574) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
type SubtractionState (line 4595) | enum SubtractionState
class SubtractionMethod (line 4624) | class SubtractionMethod
class SubtractionMethod2 (line 4675) | class SubtractionMethod2
class SubtractionHelper (line 4725) | class SubtractionHelper
class SubtractionHelper<T, U, SubtractionState_BothUnsigned> (line 4728) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned>
method Subtract (line 4731) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4744) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_BothUnsigned2> (line 4758) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned2>
method Subtract (line 4761) | static bool Subtract(const T& lhs, const U& rhs, U& result) SAFEIN...
method SubtractThrow (line 4775) | static void SubtractThrow(const T& lhs, const U& rhs, U& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMinMax> (line 4790) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4793) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4809) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMinMax2> (line 4820) | class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4823) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4833) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin> (line 4844) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin>
method Subtract (line 4847) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4863) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeIntMinMax> (line 4880) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4883) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4893) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeIntMinMax2> (line 4904) | class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4907) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4917) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin> (line 4928) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin>
method Subtract (line 4931) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4947) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Uint64Int> (line 4964) | class SubtractionHelper<T, U, SubtractionState_Uint64Int>
method Subtract (line 4967) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4992) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Uint64Int2> (line 5018) | class SubtractionHelper<U, T, SubtractionState_Uint64Int2>
method Subtract (line 5021) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5062) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_UintInt64> (line 5104) | class SubtractionHelper<T, U, SubtractionState_UintInt64>
method Subtract (line 5107) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5138) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_UintInt642> (line 5170) | class SubtractionHelper<U, T, SubtractionState_UintInt642>
method Subtract (line 5173) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5199) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Int> (line 5226) | class SubtractionHelper<T, U, SubtractionState_Int64Int>
method Subtract (line 5229) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5255) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Int2> (line 5281) | class SubtractionHelper<U, T, SubtractionState_Int64Int2>
method Subtract (line 5284) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5319) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntInt64> (line 5356) | class SubtractionHelper<T, U, SubtractionState_IntInt64>
method Subtract (line 5359) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5419) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntInt642> (line 5480) | class SubtractionHelper<U, T, SubtractionState_IntInt642>
method Subtract (line 5483) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5499) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint> (line 5515) | class SubtractionHelper<T, U, SubtractionState_Int64Uint>
method Subtract (line 5518) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5534) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Uint2> (line 5551) | class SubtractionHelper<U, T, SubtractionState_Int64Uint2>
method Subtract (line 5555) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5570) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntUint64> (line 5586) | class SubtractionHelper<T, U, SubtractionState_IntUint64>
method Subtract (line 5589) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5619) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntUint642> (line 5650) | class SubtractionHelper<U, T, SubtractionState_IntUint642>
method Subtract (line 5653) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5666) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint64> (line 5680) | class SubtractionHelper<T, U, SubtractionState_Int64Uint64>
method Subtract (line 5683) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5699) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
class SubtractionHelper<U, T, SubtractionState_Int64Uint642> (line 5717) | class SubtractionHelper<U, T, SubtractionState_Int64Uint642>
method Subtract (line 5722) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5735) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
type BinaryState (line 5748) | enum BinaryState
class BinaryMethod (line 5757) | class BinaryMethod
class BinaryAndHelper (line 5780) | class BinaryAndHelper
class BinaryAndHelper<T, U, BinaryState_OK> (line 5783) | class BinaryAndHelper<T, U, BinaryState_OK>
method T (line 5786) | static T And(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs & rhs); }
class BinaryAndHelper<T, U, BinaryState_Int8> (line 5790) | class BinaryAndHelper<T, U, BinaryState_Int8>
method T (line 5793) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int16> (line 5802) | class BinaryAndHelper<T, U, BinaryState_Int16>
method T (line 5805) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int32> (line 5814) | class BinaryAndHelper<T, U, BinaryState_Int32>
method T (line 5817) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper (line 5826) | class BinaryOrHelper
class BinaryOrHelper<T, U, BinaryState_OK> (line 5829) | class BinaryOrHelper<T, U, BinaryState_OK>
method T (line 5832) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs | rhs); }
class BinaryOrHelper<T, U, BinaryState_Int8> (line 5836) | class BinaryOrHelper<T, U, BinaryState_Int8>
method T (line 5839) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int16> (line 5848) | class BinaryOrHelper<T, U, BinaryState_Int16>
method T (line 5851) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int32> (line 5860) | class BinaryOrHelper<T, U, BinaryState_Int32>
method T (line 5863) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper (line 5872) | class BinaryXorHelper
class BinaryXorHelper<T, U, BinaryState_OK> (line 5875) | class BinaryXorHelper<T, U, BinaryState_OK>
method T (line 5878) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs ^ rhs); }
class BinaryXorHelper<T, U, BinaryState_Int8> (line 5882) | class BinaryXorHelper<T, U, BinaryState_Int8>
method T (line 5885) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int16> (line 5894) | class BinaryXorHelper<T, U, BinaryState_Int16>
method T (line 5897) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int32> (line 5906) | class BinaryXorHelper<T, U, BinaryState_Int32>
method T (line 5909) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
function SafeCast (line 5923) | inline bool SafeCast(const T From, U& To) SAFEINT_NOTHROW
function SafeEquals (line 5929) | inline bool SafeEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeNotEquals (line 5935) | inline bool SafeNotEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThan (line 5941) | inline bool SafeGreaterThan(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThanEquals (line 5947) | inline bool SafeGreaterThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThan (line 5953) | inline bool SafeLessThan(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThanEquals (line 5959) | inline bool SafeLessThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeModulus (line 5965) | inline bool SafeModulus(const T& t, const U& u, T& result) SAFEINT_N...
function SafeMultiply (line 5971) | inline bool SafeMultiply(T t, U u, T& result) SAFEINT_NOTHROW
function SafeDivide (line 5977) | inline bool SafeDivide(T t, U u, T& result) SAFEINT_NOTHROW
function SafeAdd (line 5983) | inline bool SafeAdd(T t, U u, T& result) SAFEINT_NOTHROW
function SafeSubtract (line 5989) | inline bool SafeSubtract(T t, U u, T& result) SAFEINT_NOTHROW
class SafeInt (line 5999) | class SafeInt
method SafeInt (line 6002) | SafeInt() SAFEINT_NOTHROW
method SafeInt (line 6011) | SafeInt(const T& i) SAFEINT_NOTHROW
method SafeInt (line 6019) | SafeInt(bool b) SAFEINT_NOTHROW
method SafeInt (line 6025) | constexpr SafeInt(const SafeInt<T, E>& u) SAFEINT_CPP_THROW = defa...
method SafeInt (line 6028) | SafeInt(const SafeInt<U, E>& u) SAFEINT_CPP_THROW
method SafeInt (line 6035) | SafeInt(const U& i) SAFEINT_CPP_THROW
method T (line 6213) | T* Ptr() SAFEINT_NOTHROW { return &m_int; }
method T (line 6214) | const T* Ptr() const SAFEINT_NOTHROW { return &m_int; }
method T (line 6215) | const T& Ref() const SAFEINT_NOTHROW { return m_int; }
method T (line 6222) | T* operator&() SAFEINT_NOTHROW { return &m_int; }
method T (line 6223) | const T* operator&() const SAFEINT_NOTHROW { return &m_int; }
method Min (line 6724) | SafeInt<T, E> Min(SafeInt<T, E> test, const T floor = IntTraits<T>...
method Max (line 6730) | SafeInt<T, E> Max(SafeInt<T, E> test, const T upper = IntTraits<T>...
method Swap (line 6736) | void Swap(SafeInt<T, E>& with) SAFEINT_NOTHROW
method SafeAtoI (line 6743) | static SafeInt<T, E> SafeAtoI(const char* input) SAFEINT_CPP_THROW...
method SafeWtoI (line 6745) | static SafeInt<T, E> SafeWtoI(const wchar_t* input) { return SafeT...
type alignBits (line 6747) | enum alignBits
method SafeTtoI (line 6798) | static SafeInt<T, E> SafeTtoI(U* input) SAFEINT_CPP_THROW
function SafePtrDiff (line 6839) | SafeInt<ptrdiff_t, SafeIntDefaultExceptionHandler> SafePtrDiff(const...
class ModulusSimpleCaseHelper (line 6986) | class ModulusSimpleCaseHelper
class ModulusSignedCaseHelper (line 6989) | class ModulusSignedCaseHelper
class ModulusSignedCaseHelper<T, E, true> (line 6992) | class ModulusSignedCaseHelper<T, E, true>
method SignedCase (line 6995) | static bool SignedCase(SafeInt<T, E> rhs, SafeInt<T, E>& result) S...
class ModulusSignedCaseHelper<T, E, false> (line 7007) | class ModulusSignedCaseHelper<T, E, false>
method SignedCase (line 7010) | static bool SignedCase(SafeInt<T, E> /*rhs*/, SafeInt<T, E>& /*res...
class ModulusSimpleCaseHelper<T, U, E, true> (line 7014) | class ModulusSimpleCaseHelper<T, U, E, true>
method ModulusSimpleCase (line 7017) | static bool ModulusSimpleCase(U lhs, SafeInt<T, E> rhs, SafeInt<T,...
class ModulusSimpleCaseHelper<T, U, E, false> (line 7032) | class ModulusSimpleCaseHelper<T, U, E, false>
method ModulusSimpleCase (line 7035) | static bool ModulusSimpleCase(U /*lhs*/, SafeInt<T, E> /*rhs*/, Sa...
class DivisionNegativeCornerCaseHelper (line 7073) | class DivisionNegativeCornerCaseHelper
class DivisionNegativeCornerCaseHelper<T, U, E, true> (line 7076) | class DivisionNegativeCornerCaseHelper<T, U, E, true>
method NegativeCornerCase (line 7079) | static bool NegativeCornerCase(U lhs, SafeInt<T, E> rhs, SafeInt<T...
class DivisionNegativeCornerCaseHelper<T, U, E, false> (line 7111) | class DivisionNegativeCornerCaseHelper<T, U, E, false>
method NegativeCornerCase (line 7114) | static bool NegativeCornerCase(U /*lhs*/, SafeInt<T, E> /*rhs*/, S...
class DivisionCornerCaseHelper (line 7121) | class DivisionCornerCaseHelper
class DivisionCornerCaseHelper<T, U, E, true> (line 7124) | class DivisionCornerCaseHelper<T, U, E, true>
method DivisionCornerCase1 (line 7127) | static bool DivisionCornerCase1(U lhs, SafeInt<T, E> rhs, SafeInt<...
class DivisionCornerCaseHelper<T, U, E, false> (line 7153) | class DivisionCornerCaseHelper<T, U, E, false>
method DivisionCornerCase1 (line 7156) | static bool DivisionCornerCase1(U /*lhs*/, SafeInt<T, E> /*rhs*/, ...
class DivisionCornerCaseHelper2 (line 7163) | class DivisionCornerCaseHelper2
class DivisionCornerCaseHelper2<T, U, E, true> (line 7166) | class DivisionCornerCaseHelper2<T, U, E, true>
method DivisionCornerCase2 (line 7169) | static bool DivisionCornerCase2(U lhs, SafeInt<T, E> rhs, SafeInt<...
class DivisionCornerCaseHelper2<T, U, E, false> (line 7201) | class DivisionCornerCaseHelper2<T, U, E, false>
method DivisionCornerCase2 (line 7204) | static bool DivisionCornerCase2(U /*lhs*/, SafeInt<T, E> /*rhs*/, ...
function T (line 7252) | T& operator+=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7261) | T& operator-=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7270) | T& operator*=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7279) | T& operator/=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7288) | T& operator%=(T& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7297) | T& operator&=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7304) | T& operator^=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7311) | T& operator|=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7318) | T& operator<<=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7325) | T& operator>>=(T& lhs, SafeInt<U, E> rhs) SAFEINT_NOTHROW
function T (line 7336) | T*& operator+=(T*& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7349) | T*& operator-=(T*& lhs, SafeInt<U, E> rhs) SAFEINT_CPP_THROW
function T (line 7359) | T*& operator*=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7367) | T*& operator/=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7375) | T*& operator%=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7383) | T*& operator&=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7391) | T*& operator^=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7399) | T*& operator|=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7407) | T*& operator<<=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
function T (line 7415) | T*& operator>>=(T*& lhs, SafeInt<U, E>) SAFEINT_NOTHROW
type safeint3 (line 638) | namespace safeint3
type SafeIntError (line 550) | enum SafeIntError
function SafeIntExceptionAssert (line 648) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW { SAFEINT_ASSER...
function SafeIntExceptionAssert (line 650) | inline void SafeIntExceptionAssert() SAFEINT_NOTHROW {}
function SafeIntException (line 665) | class SAFEINT_VISIBLE SafeIntException
type SafeIntInternal (line 673) | namespace SafeIntInternal
class SafeIntExceptionHandler (line 681) | class SafeIntExceptionHandler
class SafeIntExceptionHandler<SafeIntException> (line 684) | class SafeIntExceptionHandler<SafeIntException>
method SAFEINT_STDCALL (line 687) | SAFEINT_STDCALL SafeIntOnOverflow()
method SAFEINT_STDCALL (line 693) | SAFEINT_STDCALL SafeIntOnDivZero()
class SafeInt_InvalidParameter (line 708) | class SafeInt_InvalidParameter
method SAFEINT_NORETURN (line 711) | static SAFEINT_NORETURN void SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_NORETURN (line 717) | static SAFEINT_NORETURN void SafeIntOnDivZero() SAFEINT_NOTHROW
class SafeIntWin32ExceptionHandler (line 726) | class SafeIntWin32ExceptionHandler
method SAFEINT_STDCALL (line 729) | SAFEINT_STDCALL SafeIntOnOverflow() SAFEINT_NOTHROW
method SAFEINT_STDCALL (line 735) | SAFEINT_STDCALL SafeIntOnDivZero() SAFEINT_NOTHROW
class CompileConst (line 799) | class CompileConst
class CompileConst<true> (line 801) | class CompileConst<true>
class CompileConst<false> (line 807) | class CompileConst<false>
class NumericType (line 822) | class NumericType
class NumericType<bool> (line 827) | class NumericType<bool>
class NumericType (line 838) | class NumericType
class NumericType<bool> (line 855) | class NumericType<bool>
class NumericType<char> (line 866) | class NumericType<char>
class NumericType<unsigned char> (line 877) | class NumericType<unsigned char>
class NumericType<signed char> (line 888) | class NumericType<signed char>
class NumericType<short> (line 899) | class NumericType<short>
class NumericType<unsigned short> (line 910) | class NumericType<unsigned short>
class NumericType<wchar_t> (line 922) | class NumericType<wchar_t>
class NumericType<int> (line 934) | class NumericType<int>
class NumericType<unsigned int> (line 945) | class NumericType<unsigned int>
class NumericType<long> (line 956) | class NumericType<long>
class NumericType<unsigned long> (line 967) | class NumericType<unsigned long>
class NumericType<__int64> (line 978) | class NumericType<__int64>
class NumericType<unsigned __int64> (line 989) | class NumericType<unsigned __int64>
class NumericType<float> (line 1000) | class NumericType<float>
class NumericType<double> (line 1011) | class NumericType<double>
class NumericType<long double> (line 1022) | class NumericType<long double>
class NumericType (line 1034) | class NumericType
class SafeIntMinMax (line 1054) | class SafeIntMinMax
class SafeIntMinMax<true, 8> (line 1057) | class SafeIntMinMax<true, 8>
class SafeIntMinMax<true, 16> (line 1064) | class SafeIntMinMax<true, 16>
class SafeIntMinMax<true, 32> (line 1071) | class SafeIntMinMax<true, 32>
class SafeIntMinMax<true, 64> (line 1078) | class SafeIntMinMax<true, 64>
class SafeIntMinMax<false, 8> (line 1086) | class SafeIntMinMax<false, 8>
class SafeIntMinMax<false, 16> (line 1093) | class SafeIntMinMax<false, 16>
class SafeIntMinMax<false, 32> (line 1100) | class SafeIntMinMax<false, 32>
class SafeIntMinMax<false, 64> (line 1107) | class SafeIntMinMax<false, 64>
class IntTraits (line 1115) | class IntTraits
class SafeIntCompare (line 1153) | class SafeIntCompare
class IntRegion (line 1174) | class IntRegion
type AbsMethod (line 1223) | enum AbsMethod
class GetAbsMethod (line 1231) | class GetAbsMethod
class AbsValueHelper (line 1246) | class AbsValueHelper
class AbsValueHelper<T, AbsMethodInt> (line 1249) | class AbsValueHelper<T, AbsMethodInt>
class AbsValueHelper<T, AbsMethodInt64> (line 1260) | class AbsValueHelper<T, AbsMethodInt64>
class AbsValueHelper<T, AbsMethodNoop> (line 1271) | class AbsValueHelper<T, AbsMethodNoop>
method T (line 1274) | static T Abs(T t) SAFEINT_NOTHROW
class NegationHelper (line 1283) | class NegationHelper
class NegationHelper<T, true> (line 1297) | class NegationHelper<T, true> // Signed
method T (line 1301) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1312) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
class SignedNegation (line 1328) | class SignedNegation
class SignedNegation<signed __int32> (line 1331) | class SignedNegation<signed __int32>
method Value (line 1334) | static signed __int32 Value(unsigned __int64 in) SAFEINT_NOTHROW
method Value (line 1339) | static signed __int32 Value(unsigned __int32 in) SAFEINT_NOTHROW {...
class SignedNegation<signed __int64> (line 1343) | class SignedNegation<signed __int64>
method Value (line 1346) | static signed __int64 Value(unsigned __int64 in) SAFEINT_NOTHROW {...
class NegationHelper<T, false> (line 1350) | class NegationHelper<T, false> // unsigned
method T (line 1354) | static T NegativeThrow(T t) SAFEINT_CPP_THROW
method Negative (line 1376) | static bool Negative(T t, T& ret) SAFEINT_NOTHROW
type CastMethod (line 1393) | enum CastMethod
class GetCastMethod (line 1407) | class GetCastMethod
class GetCastMethod<float, FromType> (line 1441) | class GetCastMethod<float, FromType>
class GetCastMethod<double, FromType> (line 1451) | class GetCastMethod<double, FromType>
class GetCastMethod<long double, FromType> (line 1461) | class GetCastMethod<long double, FromType>
class GetCastMethod<ToType, float> (line 1471) | class GetCastMethod<ToType, float>
class GetCastMethod<ToType, double> (line 1481) | class GetCastMethod<ToType, double>
class GetCastMethod<ToType, long double> (line 1491) | class GetCastMethod<ToType, long double>
class SafeCastHelper (line 1501) | class SafeCastHelper
class SafeCastHelper<T, U, CastOK> (line 1504) | class SafeCastHelper<T, U, CastOK>
method Cast (line 1507) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1514) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastFromFloat> (line 1523) | class SafeCastHelper<T, U, CastFromFloat>
method Cast (line 1526) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1537) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, bool, CastFromBool> (line 1550) | class SafeCastHelper<T, bool, CastFromBool>
method Cast (line 1553) | static bool Cast(bool b, T& t) SAFEINT_NOTHROW
method CastThrow (line 1560) | static void CastThrow(bool b, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<bool, T, CastToBool> (line 1567) | class SafeCastHelper<bool, T, CastToBool>
method Cast (line 1570) | static bool Cast(T t, bool& b) SAFEINT_NOTHROW
method CastThrow (line 1577) | static void CastThrow(T t, bool& b) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckLTZero> (line 1584) | class SafeCastHelper<T, U, CastCheckLTZero>
method Cast (line 1587) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1596) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckGTMax> (line 1605) | class SafeCastHelper<T, U, CastCheckGTMax>
method Cast (line 1608) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1617) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned> (line 1626) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxUnsigned>
method Cast (line 1629) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1639) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned> (line 1649) | class SafeCastHelper<T, U, CastCheckSafeIntMinMaxSigned>
method Cast (line 1652) | static bool Cast(U u, T& t) SAFEINT_NOTHROW
method CastThrow (line 1662) | static void CastThrow(U u, T& t) SAFEINT_CPP_THROW
type ComparisonMethod (line 1672) | enum ComparisonMethod
class ValidComparison (line 1701) | class ValidComparison
class EqualityTest (line 1722) | class EqualityTest
class EqualityTest<T, U, ComparisonMethod_Ok> (line 1725) | class EqualityTest<T, U, ComparisonMethod_Ok>
method IsEquals (line 1728) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt> (line 1732) | class EqualityTest<T, U, ComparisonMethod_CastInt>
method IsEquals (line 1735) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_CastInt64> (line 1739) | class EqualityTest<T, U, ComparisonMethod_CastInt64>
method IsEquals (line 1742) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW { retur...
class EqualityTest<T, U, ComparisonMethod_UnsignedT> (line 1746) | class EqualityTest<T, U, ComparisonMethod_UnsignedT>
method IsEquals (line 1749) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class EqualityTest<T, U, ComparisonMethod_UnsignedU> (line 1760) | class EqualityTest<T, U, ComparisonMethod_UnsignedU>
method IsEquals (line 1763) | static bool IsEquals(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest (line 1774) | class GreaterThanTest
class GreaterThanTest<T, U, ComparisonMethod_Ok> (line 1777) | class GreaterThanTest<T, U, ComparisonMethod_Ok>
method GreaterThan (line 1780) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt> (line 1784) | class GreaterThanTest<T, U, ComparisonMethod_CastInt>
method GreaterThan (line 1787) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_CastInt64> (line 1791) | class GreaterThanTest<T, U, ComparisonMethod_CastInt64>
method GreaterThan (line 1794) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW { re...
class GreaterThanTest<T, U, ComparisonMethod_UnsignedT> (line 1798) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedT>
method GreaterThan (line 1801) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class GreaterThanTest<T, U, ComparisonMethod_UnsignedU> (line 1812) | class GreaterThanTest<T, U, ComparisonMethod_UnsignedU>
method GreaterThan (line 1815) | static bool GreaterThan(const T t, const U u) SAFEINT_NOTHROW
class ModulusHelper (line 1828) | class ModulusHelper
class ModulusHelper<T, U, ComparisonMethod_Ok> (line 1831) | class ModulusHelper<T, U, ComparisonMethod_Ok>
method SafeIntError (line 1834) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1855) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt> (line 1874) | class ModulusHelper<T, U, ComparisonMethod_CastInt>
method SafeIntError (line 1877) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1896) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_CastInt64> (line 1915) | class ModulusHelper<T, U, ComparisonMethod_CastInt64>
method SafeIntError (line 1918) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1937) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedT> (line 1956) | class ModulusHelper<T, U, ComparisonMethod_UnsignedT>
method SafeIntError (line 1959) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 1974) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
class ModulusHelper<T, U, ComparisonMethod_UnsignedU> (line 1988) | class ModulusHelper<T, U, ComparisonMethod_UnsignedU>
method SafeIntError (line 1991) | static SafeIntError Modulus(const T& t, const U& u, T& result) SAF...
method ModulusThrow (line 2005) | static void ModulusThrow(const T& t, const U& u, T& result) SAFEIN...
type MultiplicationState (line 2018) | enum MultiplicationState
class MultiplicationMethod (line 2040) | class MultiplicationMethod
class MultiplicationHelper (line 2114) | class MultiplicationHelper
class MultiplicationHelper<T, U, MultiplicationState_CastInt> (line 2117) | class MultiplicationHelper<T, U, MultiplicationState_CastInt>
method Multiply (line 2121) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2132) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint> (line 2143) | class MultiplicationHelper<T, U, MultiplicationState_CastUint>
method Multiply (line 2147) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2158) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastInt64> (line 2169) | class MultiplicationHelper<T, U, MultiplicationState_CastInt64>
method Multiply (line 2173) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2184) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_CastUint64> (line 2195) | class MultiplicationHelper<T, U, MultiplicationState_CastUint64>
method Multiply (line 2199) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 2210) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class LargeIntRegMultiply (line 2223) | class LargeIntRegMultiply
function IntrinsicMultiplyUint64 (line 2227) | inline bool IntrinsicMultiplyUint64(const unsigned __int64& a,
function IntrinsicMultiplyInt64 (line 2237) | inline bool IntrinsicMultiplyInt64(const signed __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int64> (line 2269) | class LargeIntRegMultiply<unsigned __int64, unsigned __int64>
method RegMultiply (line 2272) | static bool RegMultiply(const unsigned __int64& a,
method RegMultiplyThrow (line 2333) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, unsigned __int32> (line 2394) | class LargeIntRegMultiply<unsigned __int64, unsigned __int32>
method RegMultiply (line 2397) | static bool RegMultiply(const unsigned __int64& a, unsigned __int3...
method RegMultiplyThrow (line 2436) | static void RegMultiplyThrow(const unsigned __int64& a,
class LargeIntRegMultiply<unsigned __int64, signed __int32> (line 2478) | class LargeIntRegMultiply<unsigned __int64, signed __int32>
method RegMultiply (line 2482) | static bool RegMultiply(const unsigned __int64& a, signed __int32 ...
method RegMultiplyThrow (line 2494) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<unsigned __int64, signed __int64> (line 2508) | class LargeIntRegMultiply<unsigned __int64, signed __int64>
method RegMultiply (line 2511) | static bool RegMultiply(const unsigned __int64& a, signed __int64 ...
method RegMultiplyThrow (line 2523) | static void RegMultiplyThrow(const unsigned __int64& a, signed __i...
class LargeIntRegMultiply<signed __int32, unsigned __int64> (line 2537) | class LargeIntRegMultiply<signed __int32, unsigned __int64>
method RegMultiply (line 2541) | static bool RegMultiply(signed __int32 a, const unsigned __int64& ...
method RegMultiplyThrow (line 2589) | static void RegMultiplyThrow(signed __int32 a, const unsigned __in...
class LargeIntRegMultiply<unsigned __int32, unsigned __int64> (line 2635) | class LargeIntRegMultiply<unsigned __int32, unsigned __int64>
method RegMultiply (line 2639) | static bool RegMultiply(unsigned __int32 a, const unsigned __int64...
method RegMultiplyThrow (line 2659) | static void RegMultiplyThrow(unsigned __int32 a,
class LargeIntRegMultiply<unsigned __int32, signed __int64> (line 2675) | class LargeIntRegMultiply<unsigned __int32, signed __int64>
method RegMultiply (line 2678) | static bool RegMultiply(unsigned __int32 a, const signed __int64& ...
method RegMultiplyThrow (line 2685) | static void RegMultiplyThrow(unsigned __int32 a, const signed __in...
class LargeIntRegMultiply<signed __int64, signed __int64> (line 2695) | class LargeIntRegMultiply<signed __int64, signed __int64>
method RegMultiply (line 2698) | static bool RegMultiply(const signed __int64& a, const signed __in...
method RegMultiplyThrow (line 2751) | static void RegMultiplyThrow(const signed __int64& a,
class LargeIntRegMultiply<signed __int64, unsigned __int32> (line 2806) | class LargeIntRegMultiply<signed __int64, unsigned __int32>
method RegMultiply (line 2809) | static bool RegMultiply(const signed __int64& a, unsigned __int32 ...
method RegMultiplyThrow (line 2852) | static void RegMultiplyThrow(const signed __int64& a, unsigned __i...
class LargeIntRegMultiply<signed __int64, signed __int32> (line 2896) | class LargeIntRegMultiply<signed __int64, signed __int32>
method RegMultiply (line 2899) | static bool RegMultiply(const signed __int64& a, signed __int32 b,...
method RegMultiplyThrow (line 2952) | static void RegMultiplyThrow(signed __int64 a, signed __int32 b, s...
class LargeIntRegMultiply<signed __int32, signed __int64> (line 3003) | class LargeIntRegMultiply<signed __int32, signed __int64>
method RegMultiply (line 3006) | static bool RegMultiply(signed __int32 a, const signed __int64& b,...
method RegMultiplyThrow (line 3070) | static void RegMultiplyThrow(signed __int32 a, const signed __int6...
class LargeIntRegMultiply<signed __int64, unsigned __int64> (line 3134) | class LargeIntRegMultiply<signed __int64, unsigned __int64>
method RegMultiply (line 3138) | static bool RegMultiply(const signed __int64& a, const unsigned __...
method RegMultiplyThrow (line 3179) | static void RegMultiplyThrow(const signed __int64& a,
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64> (line 3227) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint64>
method Multiply (line 3231) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3241) | static void MultiplyThrow(const unsigned __int64& t, const unsigne...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint> (line 3252) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Uint>
method Multiply (line 3257) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3266) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintUint64> (line 3277) | class MultiplicationHelper<T, U, MultiplicationState_UintUint64>
method Multiply (line 3282) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3298) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int> (line 3311) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int>
method Multiply (line 3316) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3325) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64> (line 3335) | class MultiplicationHelper<T, U, MultiplicationState_Uint64Int64>
method Multiply (line 3340) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3350) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_UintInt64> (line 3361) | class MultiplicationHelper<T, U, MultiplicationState_UintInt64>
method Multiply (line 3366) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3382) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint> (line 3395) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint>
method Multiply (line 3400) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3409) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int64> (line 3419) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int64>
method Multiply (line 3423) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3432) | static void MultiplyThrow(const T& t, const U& u, T& ret) SAFEINT_...
class MultiplicationHelper<T, U, MultiplicationState_Int64Int> (line 3442) | class MultiplicationHelper<T, U, MultiplicationState_Int64Int>
method Multiply (line 3447) | static bool Multiply(const T& t, U u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3455) | static void MultiplyThrow(const __int64& t, U u, T& ret) SAFEINT_C...
class MultiplicationHelper<T, U, MultiplicationState_IntUint64> (line 3465) | class MultiplicationHelper<T, U, MultiplicationState_IntUint64>
method Multiply (line 3470) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3486) | static void MultiplyThrow(T t, const unsigned __int64& u, T& ret) ...
class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64> (line 3498) | class MultiplicationHelper<T, U, MultiplicationState_Int64Uint64>
method Multiply (line 3503) | static bool Multiply(const T& t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3512) | static void MultiplyThrow(const __int64& t, const unsigned __int64...
class MultiplicationHelper<T, U, MultiplicationState_IntInt64> (line 3523) | class MultiplicationHelper<T, U, MultiplicationState_IntInt64>
method Multiply (line 3528) | static bool Multiply(T t, const U& u, T& ret) SAFEINT_NOTHROW
method MultiplyThrow (line 3544) | static void MultiplyThrow(T t, const U& u, T& ret) SAFEINT_CPP_THROW
type DivisionState (line 3555) | enum DivisionState
class DivisionMethod (line 3566) | class DivisionMethod
class DivisionHelper (line 3586) | class DivisionHelper
class DivisionHelper<T, U, DivisionState_OK> (line 3589) | class DivisionHelper<T, U, DivisionState_OK>
method SafeIntError (line 3592) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3607) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_UnsignedSigned> (line 3622) | class DivisionHelper<T, U, DivisionState_UnsignedSigned>
method SafeIntError (line 3625) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3653) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned32> (line 3682) | class DivisionHelper<T, U, DivisionState_SignedUnsigned32>
method SafeIntError (line 3685) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3708) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedUnsigned64> (line 3733) | class DivisionHelper<T, U, DivisionState_SignedUnsigned64>
method SafeIntError (line 3736) | static SafeIntError Divide(const T& t, const unsigned __int64& u, ...
method DivideThrow (line 3773) | static void DivideThrow(const T& t, const unsigned __int64& u, T& ...
class DivisionHelper<T, U, DivisionState_SignedUnsigned> (line 3810) | class DivisionHelper<T, U, DivisionState_SignedUnsigned>
method SafeIntError (line 3815) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3833) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
class DivisionHelper<T, U, DivisionState_SignedSigned> (line 3851) | class DivisionHelper<T, U, DivisionState_SignedSigned>
method SafeIntError (line 3854) | static SafeIntError Divide(const T& t, const U& u, T& result) SAFE...
method DivideThrow (line 3875) | static void DivideThrow(const T& t, const U& u, T& result) SAFEINT...
type AdditionState (line 3895) | enum AdditionState
class AdditionMethod (line 3916) | class AdditionMethod
class AdditionHelper (line 3985) | class AdditionHelper
class AdditionHelper<T, U, AdditionState_CastIntCheckMax> (line 3988) | class AdditionHelper<T, U, AdditionState_CastIntCheckMax>
method Addition (line 3991) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4006) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow> (line 4022) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflow>
method Addition (line 4025) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4040) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax> (line 4056) | class AdditionHelper<T, U, AdditionState_CastUintCheckOverflowMax>
method Addition (line 4059) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4074) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow> (line 4090) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflow>
method Addition (line 4093) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4109) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax> (line 4126) | class AdditionHelper<T, U, AdditionState_CastUint64CheckOverflowMax>
method Addition (line 4129) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4145) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax> (line 4162) | class AdditionHelper<T, U, AdditionState_CastIntCheckSafeIntMinMax>
method Addition (line 4165) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4180) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax> (line 4196) | class AdditionHelper<T, U, AdditionState_CastInt64CheckSafeIntMinMax>
method Addition (line 4199) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4214) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckMax> (line 4230) | class AdditionHelper<T, U, AdditionState_CastInt64CheckMax>
method Addition (line 4233) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4248) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax> (line 4264) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax>
method Addition (line 4267) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4300) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2> (line 4334) | class AdditionHelper<T, U, AdditionState_CastUint64CheckSafeIntMinMax2>
method Addition (line 4337) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4365) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow> (line 4394) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflow>
method Addition (line 4397) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4418) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeIntMinMax> (line 4439) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowSafeI...
method Addition (line 4442) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4459) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax> (line 4478) | class AdditionHelper<T, U, AdditionState_CastInt64CheckOverflowMax>
method Addition (line 4481) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4496) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64> (line 4514) | class AdditionHelper<T, U, AdditionState_ManualCheckInt64Uint64>
method Addition (line 4517) | static bool Addition(const __int64& lhs, const unsigned __int64& r...
method AdditionThrow (line 4535) | static void AdditionThrow(const __int64& lhs, const unsigned __int...
class AdditionHelper<T, U, AdditionState_ManualCheck> (line 4552) | class AdditionHelper<T, U, AdditionState_ManualCheck>
method Addition (line 4555) | static bool Addition(const T& lhs, const U& rhs, T& result) SAFEIN...
method AdditionThrow (line 4574) | static void AdditionThrow(const T& lhs, const U& rhs, T& result) S...
type SubtractionState (line 4595) | enum SubtractionState
class SubtractionMethod (line 4624) | class SubtractionMethod
class SubtractionMethod2 (line 4675) | class SubtractionMethod2
class SubtractionHelper (line 4725) | class SubtractionHelper
class SubtractionHelper<T, U, SubtractionState_BothUnsigned> (line 4728) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned>
method Subtract (line 4731) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4744) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_BothUnsigned2> (line 4758) | class SubtractionHelper<T, U, SubtractionState_BothUnsigned2>
method Subtract (line 4761) | static bool Subtract(const T& lhs, const U& rhs, U& result) SAFEIN...
method SubtractThrow (line 4775) | static void SubtractThrow(const T& lhs, const U& rhs, U& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMinMax> (line 4790) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4793) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4809) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMinMax2> (line 4820) | class SubtractionHelper<U, T, SubtractionState_CastIntCheckSafeIntMi...
method Subtract (line 4823) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4833) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin> (line 4844) | class SubtractionHelper<T, U, SubtractionState_CastIntCheckMin>
method Subtract (line 4847) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4863) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeIntMinMax> (line 4880) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4883) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4893) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeIntMinMax2> (line 4904) | class SubtractionHelper<U, T, SubtractionState_CastInt64CheckSafeInt...
method Subtract (line 4907) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 4917) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin> (line 4928) | class SubtractionHelper<T, U, SubtractionState_CastInt64CheckMin>
method Subtract (line 4931) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4947) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Uint64Int> (line 4964) | class SubtractionHelper<T, U, SubtractionState_Uint64Int>
method Subtract (line 4967) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 4992) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Uint64Int2> (line 5018) | class SubtractionHelper<U, T, SubtractionState_Uint64Int2>
method Subtract (line 5021) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5062) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_UintInt64> (line 5104) | class SubtractionHelper<T, U, SubtractionState_UintInt64>
method Subtract (line 5107) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5138) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_UintInt642> (line 5170) | class SubtractionHelper<U, T, SubtractionState_UintInt642>
method Subtract (line 5173) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5199) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Int> (line 5226) | class SubtractionHelper<T, U, SubtractionState_Int64Int>
method Subtract (line 5229) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5255) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Int2> (line 5281) | class SubtractionHelper<U, T, SubtractionState_Int64Int2>
method Subtract (line 5284) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5319) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntInt64> (line 5356) | class SubtractionHelper<T, U, SubtractionState_IntInt64>
method Subtract (line 5359) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5419) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntInt642> (line 5480) | class SubtractionHelper<U, T, SubtractionState_IntInt642>
method Subtract (line 5483) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5499) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint> (line 5515) | class SubtractionHelper<T, U, SubtractionState_Int64Uint>
method Subtract (line 5518) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5534) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_Int64Uint2> (line 5551) | class SubtractionHelper<U, T, SubtractionState_Int64Uint2>
method Subtract (line 5555) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5570) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_IntUint64> (line 5586) | class SubtractionHelper<T, U, SubtractionState_IntUint64>
method Subtract (line 5589) | static bool Subtract(const T& lhs, const U& rhs, T& result) SAFEIN...
method SubtractThrow (line 5619) | static void SubtractThrow(const T& lhs, const U& rhs, T& result) S...
class SubtractionHelper<U, T, SubtractionState_IntUint642> (line 5650) | class SubtractionHelper<U, T, SubtractionState_IntUint642>
method Subtract (line 5653) | static bool Subtract(const U& lhs, const T& rhs, T& result) SAFEIN...
method SubtractThrow (line 5666) | static void SubtractThrow(const U& lhs, const T& rhs, T& result) S...
class SubtractionHelper<T, U, SubtractionState_Int64Uint64> (line 5680) | class SubtractionHelper<T, U, SubtractionState_Int64Uint64>
method Subtract (line 5683) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5699) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
class SubtractionHelper<U, T, SubtractionState_Int64Uint642> (line 5717) | class SubtractionHelper<U, T, SubtractionState_Int64Uint642>
method Subtract (line 5722) | static bool Subtract(const __int64& lhs, const unsigned __int64& r...
method SubtractThrow (line 5735) | static void SubtractThrow(const __int64& lhs, const unsigned __int...
type BinaryState (line 5748) | enum BinaryState
class BinaryMethod (line 5757) | class BinaryMethod
class BinaryAndHelper (line 5780) | class BinaryAndHelper
class BinaryAndHelper<T, U, BinaryState_OK> (line 5783) | class BinaryAndHelper<T, U, BinaryState_OK>
method T (line 5786) | static T And(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs & rhs); }
class BinaryAndHelper<T, U, BinaryState_Int8> (line 5790) | class BinaryAndHelper<T, U, BinaryState_Int8>
method T (line 5793) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int16> (line 5802) | class BinaryAndHelper<T, U, BinaryState_Int16>
method T (line 5805) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryAndHelper<T, U, BinaryState_Int32> (line 5814) | class BinaryAndHelper<T, U, BinaryState_Int32>
method T (line 5817) | static T And(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper (line 5826) | class BinaryOrHelper
class BinaryOrHelper<T, U, BinaryState_OK> (line 5829) | class BinaryOrHelper<T, U, BinaryState_OK>
method T (line 5832) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs | rhs); }
class BinaryOrHelper<T, U, BinaryState_Int8> (line 5836) | class BinaryOrHelper<T, U, BinaryState_Int8>
method T (line 5839) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int16> (line 5848) | class BinaryOrHelper<T, U, BinaryState_Int16>
method T (line 5851) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryOrHelper<T, U, BinaryState_Int32> (line 5860) | class BinaryOrHelper<T, U, BinaryState_Int32>
method T (line 5863) | static T Or(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper (line 5872) | class BinaryXorHelper
class BinaryXorHelper<T, U, BinaryState_OK> (line 5875) | class BinaryXorHelper<T, U, BinaryState_OK>
method T (line 5878) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW { return (T)(lhs ^ rhs); }
class BinaryXorHelper<T, U, BinaryState_Int8> (line 5882) | class BinaryXorHelper<T, U, BinaryState_Int8>
method T (line 5885) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int16> (line 5894) | class BinaryXorHelper<T, U, BinaryState_Int16>
method T (line 5897) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
class BinaryXorHelper<T, U, BinaryState_Int32> (line 5906) | class BinaryXorHelper<T, U, BinaryState_Int32>
method T (line 5909) | static T Xor(T lhs, U rhs) SAFEINT_NOTHROW
function SafeCast (line 5923) | inline bool SafeCast(const T From, U& To) SAFEINT_NOTHROW
function SafeEquals (line 5929) | inline bool SafeEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeNotEquals (line 5935) | inline bool SafeNotEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThan (line 5941) | inline bool SafeGreaterThan(const T t, const U u) SAFEINT_NOTHROW
function SafeGreaterThanEquals (line 5947) | inline bool SafeGreaterThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThan (line 5953) | inline bool SafeLessThan(const T t, const U u) SAFEINT_NOTHROW
function SafeLessThanEquals (line 5959) | inline bool SafeLessThanEquals(const T t, const U u) SAFEINT_NOTHROW
function SafeModulus (line 5965) | inline bool SafeModulus(const T& t, const U& u, T& result) SAFEINT_N...
function SafeMultiply (line 5971) | inline bool SafeMultiply(T t, U u, T& result) SAFEINT_NOTHROW
function SafeDivide (line 5977) | inline bool SafeDivide(T t, U u, T& result) SAFEINT_NOTHROW
function SafeAdd (line 5983) | inline bool SafeAdd(T t, U u, T& result) SAFEINT_NOTHROW
function SafeSubtract (line 5989) | inline bool SafeSubtract(T t, U u, T& result) SAFEINT_NOTHROW
class SafeInt (line 5999) | class SafeInt
method SafeInt (line 6002) | SafeInt() SAFEINT_NOTHROW
method SafeInt (line 6011) | SafeInt(const T& i) SAFEINT_NOTHROW
method SafeInt (line 6019) | SafeInt(bool b) SAFEINT_NOTHROW
method SafeInt (line 6025) | constexpr SafeInt(const SafeInt<T, E>& u) SAFEINT_CPP_THROW = defa...
method SafeInt (line 6028) | SafeInt(const SafeInt<U, E>& u) SAFEINT_CPP_THROW
method SafeInt (line 6035) | SafeInt(const U& i) SAFEINT_CPP_THROW
method T (line 6213) | T* Ptr() SAFEINT_NOTHROW { return &m_int; }
method T (line 6214) | const T* Ptr() const SAFEINT_NOTHROW { return &m_int; }
method T (line 6215) | const T& Ref() const SAFEINT_NOTHROW { return m_int; }
method T (line 6222) | T* operator&() SAFEINT_NOTHROW { return &m_int; }
method T (line 6223) | const T* operator&() const SAFEINT_NOTHROW { return &m_int; }
method Min (line 6724) | SafeInt<T, E> Min(SafeInt<T, E> test, const T floor = IntTraits<T>...
method Max (line 6730) | SafeInt<T, E> Max(SafeInt<T, E> test, const T upper = IntTraits<T>...
method Swap (line 6736) | void Swap(SafeInt<T, E>& with) SAFEINT_NOTHROW
method SafeAtoI (line 6743) | static SafeInt<T, E> SafeAtoI(const cha
Condensed preview — 432 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,769K chars).
[
{
"path": ".clang-format",
"chars": 1314,
"preview": "# https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormatStyleOptions.html\n\n---\nLanguage: Cpp\n\nBasedOnStyle: WebKit"
},
{
"path": ".gitignore",
"chars": 911,
"preview": "# Visual Studio files\n*.o\n*.d\n*.so\n*.[Oo]bj\n*.user\n*.aps\n*.pch\n*.vspscc\n*.vssscc\n*_i.c\n*_p.c\n*.ncb\n*.suo\n*.tlb\n*.tlh\n*.b"
},
{
"path": ".gitmodules",
"chars": 213,
"preview": "[submodule \"vcpkg\"]\n\tpath = vcpkg\n\turl = https://github.com/Microsoft/vcpkg\n[submodule \"websocketpp\"]\n\tpath = Release/li"
},
{
"path": ".vscode/launch.json",
"chars": 712,
"preview": "{\r\n // Use IntelliSense to learn about possible attributes.\r\n // Hover to view descriptions of existing attributes"
},
{
"path": ".vscode/settings.json",
"chars": 461,
"preview": "{\n \"files.watcherExclude\": {\n \"**/.git/objects/**\": true,\n \"**/.git/subtree-cache/**\": true,\n \"*"
},
{
"path": "Build_android/configure.sh",
"chars": 6140,
"preview": "#!/bin/bash\n# Copyright (C) Microsoft. All rights reserved.\n# Licensed under the MIT license. See LICENSE.txt file in th"
},
{
"path": "Build_android/openssl/Makefile",
"chars": 6230,
"preview": "# Configuration parameters\nANDROID_API = 18\nANDROID_ABI = armeabi-v7a\nANDROID_HOST = linux-x86_64\nANDROID_TOOLCHAIN = gc"
},
{
"path": "Build_android/openssl/openssl-1.0.2k.patch",
"chars": 9666,
"preview": "This patch applies several changes that enable OpenSSL 1.0.2k to be built\nfor Android using either Clang or GCC toolchai"
},
{
"path": "Build_android/openssl/openssl-1.0.2l.patch",
"chars": 9666,
"preview": "This patch applies several changes that enable OpenSSL 1.0.2l to be built\nfor Android using either Clang or GCC toolchai"
},
{
"path": "Build_android/openssl/openssl-1.0.2m.patch",
"chars": 9666,
"preview": "This patch applies several changes that enable OpenSSL 1.0.2m to be built\nfor Android using either Clang or GCC toolchai"
},
{
"path": "Build_android/openssl/openssl-1.0.2n.patch",
"chars": 9666,
"preview": "This patch applies several changes that enable OpenSSL 1.0.2n to be built\nfor Android using either Clang or GCC toolchai"
},
{
"path": "Build_android/openssl/openssl-1.1.0g.patch",
"chars": 4349,
"preview": "This patch applies several changes that enable OpenSSL 1.1.0g to be built\nfor Android using either Clang or GCC toolchai"
},
{
"path": "Build_android/openssl/openssl-1.1.0j.patch",
"chars": 4349,
"preview": "This patch applies several changes that enable OpenSSL 1.1.0g to be built\nfor Android using either Clang or GCC toolchai"
},
{
"path": "Build_iOS/.gitignore",
"chars": 123,
"preview": "# iOS folders that dependencies get stored in\nboostoniphone/\nboost\nboost.framework/\nios-cmake/\nopenssl/\nOpenSSL-for-iPho"
},
{
"path": "Build_iOS/CMakeLists.txt",
"chars": 3992,
"preview": "project(casablanca-ios NONE)\ncmake_minimum_required(VERSION 3.9)\n\nenable_testing()\n\nset(LIB_CPPREST libcpprest.a)\nset(LI"
},
{
"path": "Build_iOS/README.md",
"chars": 128,
"preview": "Please consult the documentation [here](https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-iOS) for iOS compi"
},
{
"path": "Build_iOS/configure.sh",
"chars": 6273,
"preview": "#!/usr/bin/env bash\nset -e\n\nusage() {\n echo \"Usage: configure.sh [-build_type type] [-deployment_target version] [-co"
},
{
"path": "CMakeLists.txt",
"chars": 113,
"preview": "cmake_minimum_required(VERSION 3.9)\r\nproject(cpprestsdk-root NONE)\r\nenable_testing()\r\nadd_subdirectory(Release)\r\n"
},
{
"path": "CONTRIBUTORS.txt",
"chars": 942,
"preview": "Contributors should submit an update to this file with a commit in order to receive recognition. Thank you for your cont"
},
{
"path": "README.md",
"chars": 4675,
"preview": "**cpprestsdk is in maintenance mode and we do not recommend its use in new projects. We will continue to fix critical bu"
},
{
"path": "Release/.gitignore",
"chars": 84,
"preview": ".ninja_*\n*.ninja\nCMakeFiles/\nCMakeCache.txt\nCTestTestfile.cmake\ncmake_install.cmake\n"
},
{
"path": "Release/CMakeLists.txt",
"chars": 11574,
"preview": "set(CMAKE_LEGACY_CYGWIN_WIN32 0)\ncmake_minimum_required(VERSION 3.9)\nif(POLICY CMP0042)\n cmake_policy(SET CMP0042 NEW) "
},
{
"path": "Release/cmake/cpprest_find_boost.cmake",
"chars": 3811,
"preview": "macro(cpprestsdk_find_boost_android_package)\n set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)\n set(CMAKE_FIND_ROOT_PATH_M"
},
{
"path": "Release/cmake/cpprest_find_brotli.cmake",
"chars": 765,
"preview": "function(cpprest_find_brotli)\n if(TARGET cpprestsdk_brotli_internal)\n return()\n endif()\n\n\n find_package(PkgConfig)"
},
{
"path": "Release/cmake/cpprest_find_openssl.cmake",
"chars": 2926,
"preview": "function(cpprest_find_openssl)\n if(TARGET cpprestsdk_openssl_internal)\n return()\n endif()\n\n if(IOS)\n set(IOS_SO"
},
{
"path": "Release/cmake/cpprest_find_websocketpp.cmake",
"chars": 1097,
"preview": "function(cpprest_find_websocketpp)\n if(TARGET cpprestsdk_websocketpp_internal)\n return()\n endif()\n\n find_package(W"
},
{
"path": "Release/cmake/cpprest_find_winhttppal.cmake",
"chars": 659,
"preview": "function(cpprest_find_winhttppal)\n if(TARGET cpprestsdk_winhttppal_internal)\n return()\n endif()\n\n if(NOT WINHTTPPA"
},
{
"path": "Release/cmake/cpprest_find_zlib.cmake",
"chars": 897,
"preview": "function(cpprest_find_zlib)\n if(TARGET cpprestsdk_zlib_internal)\n return()\n endif()\n\n if(APPLE AND NOT IOS)\n # "
},
{
"path": "Release/cmake/cpprestsdk-config-version.in.cmake",
"chars": 498,
"preview": "set(PACKAGE_VERSION @CPPREST_VERSION_MAJOR@.@CPPREST_VERSION_MINOR@.@CPPREST_VERSION_REVISION@)\n\nif(PACKAGE_VERSION VERS"
},
{
"path": "Release/cmake/cpprestsdk-config.in.cmake",
"chars": 581,
"preview": "include(CMakeFindDependencyMacro)\nif(@CPPREST_USES_ZLIB@)\n find_dependency(ZLIB)\nendif()\n\nif(@CPPREST_USES_BROTLI@)\n f"
},
{
"path": "Release/include/cpprest/astreambuf.h",
"chars": 52846,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/asyncrt_utils.h",
"chars": 25614,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/base_uri.h",
"chars": 16041,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/containerstream.h",
"chars": 22580,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/SafeInt3.hpp",
"chars": 240581,
"preview": "/*-----------------------------------------------------------------------------------------------------------\nSafeInt.hp"
},
{
"path": "Release/include/cpprest/details/basic_types.h",
"chars": 3865,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/cpprest_compat.h",
"chars": 3245,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/fileio.h",
"chars": 10394,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/http_helpers.h",
"chars": 1661,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/http_server.h",
"chars": 2098,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/http_server_api.h",
"chars": 2912,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/nosal.h",
"chars": 1234,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/details/resource.h",
"chars": 354,
"preview": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by Resource.rc\n\n// Next default values for"
},
{
"path": "Release/include/cpprest/details/web_utilities.h",
"chars": 6869,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/filestream.h",
"chars": 40696,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/http_client.h",
"chars": 35116,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/http_compression.h",
"chars": 15573,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/http_headers.h",
"chars": 10851,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/http_listener.h",
"chars": 11680,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/http_msg.h",
"chars": 68917,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/interopstream.h",
"chars": 18884,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/json.h",
"chars": 67720,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/oauth1.h",
"chars": 20791,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/oauth2.h",
"chars": 22178,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/producerconsumerstream.h",
"chars": 22515,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/rawptrstream.h",
"chars": 22802,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/streams.h",
"chars": 62877,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/uri.h",
"chars": 645,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/uri_builder.h",
"chars": 11294,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/version.h",
"chars": 383,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/ws_client.h",
"chars": 23728,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/cpprest/ws_msg.h",
"chars": 8479,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/pplx.h",
"chars": 5448,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/pplxcancellation_token.h",
"chars": 28469,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/pplxconv.h",
"chars": 2418,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/pplxinterface.h",
"chars": 6818,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/pplxlinux.h",
"chars": 7735,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/pplxtasks.h",
"chars": 327431,
"preview": "/***\r\n * Copyright (C) Microsoft. All rights reserved.\r\n * Licensed under the MIT license. See LICENSE.txt file in the p"
},
{
"path": "Release/include/pplx/pplxwin.h",
"chars": 7143,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/include/pplx/threadpool.h",
"chars": 2507,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/public_apis_doxyfile",
"chars": 101716,
"preview": "# Doxyfile 1.8.7\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) "
},
{
"path": "Release/samples/.gitignore",
"chars": 8,
"preview": "*.cmake\n"
},
{
"path": "Release/samples/BingRequest/CMakeLists.txt",
"chars": 143,
"preview": "if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)\n add_executable(BingRequest bingrequest.cpp)\n target_link_libraries(BingR"
},
{
"path": "Release/samples/BingRequest/bingrequest.cpp",
"chars": 3183,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Client/BlackJackClient.cpp",
"chars": 9254,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Client/CMakeLists.txt",
"chars": 155,
"preview": "if (UNIX)\n add_definitions(-Wno-switch)\nendif()\n\nadd_executable(blackjackclient\n BlackJackClient.cpp\n )\n\ntarget_link_"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/BlackJack_Server.cpp",
"chars": 2235,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/CMakeLists.txt",
"chars": 264,
"preview": "if (UNIX)\n add_definitions(-Wno-sign-compare -Wno-enum-compare)\nendif()\n\nadd_executable(blackjackserver\n BlackJack_Ser"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/Dealer.cpp",
"chars": 7131,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/Table.cpp",
"chars": 13727,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/Table.h",
"chars": 2001,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/messagetypes.h",
"chars": 10079,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/stdafx.cpp",
"chars": 470,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_Server/stdafx.h",
"chars": 877,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/App.xaml",
"chars": 731,
"preview": "<Application\n x:Class=\"BlackjackClient.App\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n "
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/App.xaml.cpp",
"chars": 4335,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/App.xaml.h",
"chars": 904,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/CardShape.xaml",
"chars": 1455,
"preview": "<UserControl\n x:Class=\"BlackjackClient.CardShape\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentati"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/CardShape.xaml.cpp",
"chars": 2229,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/CardShape.xaml.h",
"chars": 930,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/Common/StandardStyles.xaml",
"chars": 117234,
"preview": "<!--\n This file contains XAML styles that simplify application development.\n\n These are not merely convenient, bu"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/Package.appxmanifest",
"chars": 1375,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http:"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/Package.uwp.appxmanifest",
"chars": 1421,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package\n xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows1"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/Player.xaml",
"chars": 2336,
"preview": "<UserControl \n x:Class=\"BlackjackClient.PlayerSpace\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/present"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/Player.xaml.cpp",
"chars": 3342,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/Player.xaml.h",
"chars": 1122,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/PlayingTable.xaml",
"chars": 8163,
"preview": "<Page\n x:Class=\"BlackjackClient.PlayingTable\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/PlayingTable.xaml.cpp",
"chars": 16303,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/PlayingTable.xaml.h",
"chars": 5076,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/messagetypes.h",
"chars": 5836,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/pch.cpp",
"chars": 475,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/BlackJack_UIClient/pch.h",
"chars": 519,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/BlackJack/CMakeLists.txt",
"chars": 167,
"preview": "if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)\n add_subdirectory(BlackJack_Server)\n add_subdirectory(BlackJack_Client)\ne"
},
{
"path": "Release/samples/CMakeLists.txt",
"chars": 270,
"preview": "add_subdirectory(SearchFile)\nadd_subdirectory(BingRequest)\nadd_subdirectory(BlackJack)\nadd_subdirectory(Oauth1Client)\nad"
},
{
"path": "Release/samples/CasaLens/AppCode.html",
"chars": 8152,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title>Casa Lens | Casablana Test App</title>\n <meta charset=\"utf-8\" />\n <link "
},
{
"path": "Release/samples/CasaLens/CasaLens141/AppCode.html",
"chars": 8152,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <title>Casa Lens | Casablana Test App</title>\n <meta charset=\"utf-8\" />\n <link "
},
{
"path": "Release/samples/CasaLens/CasaLens141/css/default.css",
"chars": 1413,
"preview": "body\n{\n\twidth: 100%;\n\theight: 100%;\n\tfont-family: Calibri;\n\tbackground-image: linear-gradient(20deg, white, #DDE6DF 62."
},
{
"path": "Release/samples/CasaLens/CasaLens141/js/default.js",
"chars": 6111,
"preview": "function formatAMPM(date) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var ampm = hours "
},
{
"path": "Release/samples/CasaLens/ReadMe.txt",
"chars": 2868,
"preview": "========================================================================\n CasaLens Project Overview\n================="
},
{
"path": "Release/samples/CasaLens/casalens.cpp",
"chars": 6113,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/CasaLens/casalens.h",
"chars": 4344,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/CasaLens/css/default.css",
"chars": 1413,
"preview": "body\n{\n\twidth: 100%;\n\theight: 100%;\n\tfont-family: Calibri;\n\tbackground-image: linear-gradient(20deg, white, #DDE6DF 62."
},
{
"path": "Release/samples/CasaLens/datafetcher.cpp",
"chars": 19925,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/CasaLens/js/default.js",
"chars": 6111,
"preview": "function formatAMPM(date) {\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var ampm = hours "
},
{
"path": "Release/samples/CasaLens/stdafx.cpp",
"chars": 415,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/CasaLens/stdafx.h",
"chars": 695,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/App.xaml",
"chars": 1147,
"preview": "<!--\n Copyright (C) Microsoft. All rights reserved.\n Licensed under the MIT license. See LICENSE.txt file in the project"
},
{
"path": "Release/samples/FacebookDemo/App.xaml.cpp",
"chars": 4319,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/App.xaml.h",
"chars": 897,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/Common/StandardStyles.xaml",
"chars": 117582,
"preview": "<!--\n Copyright (C) Microsoft. All rights reserved.\n Licensed under the MIT license. See LICENSE.txt file in the project"
},
{
"path": "Release/samples/FacebookDemo/Facebook.cpp",
"chars": 5232,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/Facebook.h",
"chars": 1093,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/MainPage.xaml",
"chars": 2216,
"preview": "<!--\n Copyright (C) Microsoft. All rights reserved.\n Licensed under the MIT license. See LICENSE.txt file in the project"
},
{
"path": "Release/samples/FacebookDemo/MainPage.xaml.cpp",
"chars": 3398,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/MainPage.xaml.h",
"chars": 1738,
"preview": "/***\n* Copyright (C) Microsoft. All rights reserved.\n* Licensed under the MIT license. See LICENSE.txt file in the proje"
},
{
"path": "Release/samples/FacebookDemo/Package.appxmanifest",
"chars": 1314,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http:"
},
{
"path": "Release/samples/FacebookDemo/Package.uwp.appxmanifest",
"chars": 1439,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Package\r\n xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows"
},
{
"path": "Release/samples/FacebookDemo/pch.cpp",
"chars": 453,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/FacebookDemo/pch.h",
"chars": 491,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/OAuth2Live/App.xaml",
"chars": 741,
"preview": "<Application\r\n x:Class=\"OAuth2Live.App\"\r\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n "
},
{
"path": "Release/samples/OAuth2Live/App.xaml.cpp",
"chars": 4053,
"preview": "//\r\n// App.xaml.cpp\r\n// Implementation of the App class.\r\n//\r\n\r\n#include \"pch.h\"\r\n\r\n#include \"MainPage.xaml.h\"\r\n\r\nusing"
},
{
"path": "Release/samples/OAuth2Live/App.xaml.h",
"chars": 546,
"preview": "//\r\n// App.xaml.h\r\n// Declaration of the App class.\r\n//\r\n\r\n#pragma once\r\n\r\n#include \"App.g.h\"\r\n\r\nnamespace OAuth2Live\r\n"
},
{
"path": "Release/samples/OAuth2Live/Common/StandardStyles.xaml",
"chars": 119063,
"preview": "<!--\r\n This file contains XAML styles that simplify application development.\r\n\r\n These are not merely convenient,"
},
{
"path": "Release/samples/OAuth2Live/MainPage.xaml",
"chars": 2724,
"preview": "<Page\r\n x:Class=\"OAuth2Live.MainPage\"\r\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n xm"
},
{
"path": "Release/samples/OAuth2Live/MainPage.xaml.cpp",
"chars": 9730,
"preview": "//\r\n// MainPage.xaml.cpp\r\n// Implementation of the MainPage class.\r\n//\r\n\r\n#include \"pch.h\"\r\n\r\n#include \"MainPage.xaml.h"
},
{
"path": "Release/samples/OAuth2Live/MainPage.xaml.h",
"chars": 1593,
"preview": "//\r\n// MainPage.xaml.h\r\n// Declaration of the MainPage class.\r\n//\r\n\r\n#pragma once\r\n\r\n#include \"MainPage.g.h\"\r\n\r\nusing w"
},
{
"path": "Release/samples/OAuth2Live/Package.appxmanifest",
"chars": 1314,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\">\n\n <Identity N"
},
{
"path": "Release/samples/OAuth2Live/Package.uwp.appxmanifest",
"chars": 1397,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package\n xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows1"
},
{
"path": "Release/samples/OAuth2Live/pch.cpp",
"chars": 110,
"preview": "//\r\n// pch.cpp\r\n// Include the standard header and generate the precompiled header.\r\n//\r\n\r\n#include \"pch.h\"\r\n"
},
{
"path": "Release/samples/OAuth2Live/pch.h",
"chars": 366,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/Oauth1Client/CMakeLists.txt",
"chars": 157,
"preview": "if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)\n add_executable(oauth1client\n Oauth1Client.cpp\n )\n\n target_link_lib"
},
{
"path": "Release/samples/Oauth1Client/Oauth1Client.cpp",
"chars": 9103,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/Oauth2Client/CMakeLists.txt",
"chars": 157,
"preview": "if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)\n add_executable(oauth2client\n Oauth2Client.cpp\n )\n\n target_link_lib"
},
{
"path": "Release/samples/Oauth2Client/Oauth2Client.cpp",
"chars": 9838,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/SearchFile/CMakeLists.txt",
"chars": 141,
"preview": "if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)\n add_executable(SearchFile searchfile.cpp)\n target_link_libraries(SearchF"
},
{
"path": "Release/samples/SearchFile/searchfile.cpp",
"chars": 6845,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/App.xaml",
"chars": 731,
"preview": "<Application\n x:Class=\"WindowsLiveAuth.App\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n "
},
{
"path": "Release/samples/WindowsLiveAuth/App.xaml.cpp",
"chars": 4059,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/App.xaml.h",
"chars": 645,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/Common/StandardStyles.xaml",
"chars": 117234,
"preview": "<!--\n This file contains XAML styles that simplify application development.\n\n These are not merely convenient, bu"
},
{
"path": "Release/samples/WindowsLiveAuth/MainPage.xaml",
"chars": 1721,
"preview": "<Page\n x:Class=\"WindowsLiveAuth.MainPage\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n "
},
{
"path": "Release/samples/WindowsLiveAuth/MainPage.xaml.cpp",
"chars": 7530,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/MainPage.xaml.h",
"chars": 1027,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/Package.appxmanifest",
"chars": 1344,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http:"
},
{
"path": "Release/samples/WindowsLiveAuth/live_connect.h",
"chars": 20802,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/pch.cpp",
"chars": 185,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/samples/WindowsLiveAuth/pch.h",
"chars": 280,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/.gitignore",
"chars": 8,
"preview": "*.cmake\n"
},
{
"path": "Release/src/CMakeLists.txt",
"chars": 10945,
"preview": "cmake_policy(SET CMP0022 NEW)\n\nfile(GLOB HEADERS_CPPREST \"../include/cpprest/*.h\" \"../include/cpprest/*.hpp\" \"../include"
},
{
"path": "Release/src/http/client/http_client.cpp",
"chars": 15189,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/client/http_client_asio.cpp",
"chars": 83459,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/client/http_client_impl.h",
"chars": 5121,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/client/http_client_msg.cpp",
"chars": 2701,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/client/http_client_winhttp.cpp",
"chars": 117162,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/client/http_client_winrt.cpp",
"chars": 20849,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/client/x509_cert_utilities.cpp",
"chars": 17022,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/common/connection_pool_helpers.h",
"chars": 1624,
"preview": "#pragma once\n\n#include \"cpprest/details/cpprest_compat.h\"\n#include <memory>\n#include <stddef.h>\n#include <vector>\n\nnames"
},
{
"path": "Release/src/http/common/http_compression.cpp",
"chars": 39262,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/common/http_helpers.cpp",
"chars": 3826,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/common/http_msg.cpp",
"chars": 40768,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/common/internal_http_helpers.h",
"chars": 2305,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/common/x509_cert_utilities.h",
"chars": 3355,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/listener/http_listener.cpp",
"chars": 4794,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/listener/http_listener_msg.cpp",
"chars": 2938,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/listener/http_server_api.cpp",
"chars": 5077,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/listener/http_server_asio.cpp",
"chars": 48232,
"preview": "/***\n* Copyright (C) Microsoft. All rights reserved.\n* Licensed under the MIT license. See LICENSE.txt file in the proje"
},
{
"path": "Release/src/http/listener/http_server_httpsys.cpp",
"chars": 48899,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/listener/http_server_httpsys.h",
"chars": 8190,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/listener/http_server_impl.h",
"chars": 354,
"preview": "#pragma once\n\n#include \"cpprest/details/http_server.h\"\n#include <memory>\n\nnamespace web\n{\nnamespace http\n{\nnamespace exp"
},
{
"path": "Release/src/http/oauth/oauth1.cpp",
"chars": 15680,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/http/oauth/oauth2.cpp",
"chars": 7746,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/json/json.cpp",
"chars": 14613,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/json/json_parsing.cpp",
"chars": 38076,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/json/json_serialization.cpp",
"chars": 7890,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pch/stdafx.cpp",
"chars": 477,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pch/stdafx.h",
"chars": 3166,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pplx/pplx.cpp",
"chars": 3342,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pplx/pplxapple.cpp",
"chars": 1311,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pplx/pplxlinux.cpp",
"chars": 1198,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pplx/pplxwin.cpp",
"chars": 7999,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/pplx/threadpool.cpp",
"chars": 6688,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/streams/fileio_posix.cpp",
"chars": 22149,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/streams/fileio_win32.cpp",
"chars": 36242,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/streams/fileio_winrt.cpp",
"chars": 38380,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/uri/uri.cpp",
"chars": 26344,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/uri/uri_builder.cpp",
"chars": 4912,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/utilities/asyncrt_utils.cpp",
"chars": 46473,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/utilities/base64.cpp",
"chars": 8486,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/utilities/web_utilities.cpp",
"chars": 6106,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
},
{
"path": "Release/src/websockets/client/ws_client.cpp",
"chars": 3376,
"preview": "/***\n * Copyright (C) Microsoft. All rights reserved.\n * Licensed under the MIT license. See LICENSE.txt file in the pro"
}
]
// ... and 232 more files (download for full content)
About this extraction
This page contains the full source code of the microsoft/cpprestsdk GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 432 files (4.4 MB), approximately 1.2M tokens, and a symbol index with 2671 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.