https://github.com/bobsteagall/wg21
Various documents and code related to proposals for WG21
https://github.com/bobsteagall/wg21
cplusplus cplusplus-20 cplusplus-23
Last synced: 1 day ago
JSON representation
Various documents and code related to proposals for WG21
- Host: GitHub
- URL: https://github.com/bobsteagall/wg21
- Owner: BobSteagall
- License: ncsa
- Created: 2019-02-06T16:27:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-05T15:05:54.000Z (9 months ago)
- Last Synced: 2025-04-26T10:11:59.350Z (1 day ago)
- Topics: cplusplus, cplusplus-20, cplusplus-23
- Language: C++
- Homepage:
- Size: 4.57 MB
- Stars: 66
- Watchers: 18
- Forks: 11
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## wg21
[](https://github.com/BobSteagall/wg21/actions?query=workflow%3A%22CMake%22+branch%3Amaster)Work on revision R7 of linear algebra proposal P1385 is currently underway in the `r7y` branch. We are targeting C++26.
## Support
This reference implementation requires several C++20 capabilities which are only available in newer compiler releases.
Current compiler support is as follows, but will change as new compilers become available and catch up with implementing new language features for C++20. Builds and unit testing have been successful on the following combinations of operating system and compiler:
* Windows 10
* Visual Studio 2019, Version 16.5.4 and higher* Linux (written and tested on RHEL 8.X)
* GCC 12.x## Cloning the Repo
After ensuring that git is in your executable path, open a terminal window on Linux, or a Command Prompt on Windows 10, and then:
```bash
cd
git clone --recurse-submodules https://github.com/BobSteagall/wg21.git
```If you do not specify ``, it will default to `wg21`.
## Building with the Visual Studio Solution
Open the `lin_alg_test.sln` solution file in the `/` directory. Click **Build..Build Solution** to build the unit test program. (Note: This build method uses the NuGet package manager to download and install Google Test in the `/packages` directory, so you'll need to ensure NuGet is installed.)
## Building Manually Via CMake on Windows 10
The unit test program can be built via CMake on Windows 10 by proceeding as follows. First, generate the Visual Studio project files:
```bash
cd
mkdir build-win
cd build-win
cmake -G "Visual Studio 16 2019" ..
```Next, build the `Debug` configuration and run the unit test:
```bash
cmake --build . --config Debug
ctest -C Debug
```Finally, build the `Release` configuration and run the unit test:
```bash
cmake --build . --config Release
ctest -C Release
```> Note: CMake uses a multi-configuration generator for Visual Studio, so there is no need to specify a CMake build type; in fact, CMake will ignore `CMAKE_BUILD_TYPE` when using the Visual Studio generator.
The following CMake configuration options are available on Windows:
| Name | Possible Values | Description | Default Value |
|--------------------------|--------------------------------------|--------------------------------------|---------------|
| `BUILD_TESTING` | `ON`, `OFF` | Build the test suite | `ON` |
| `LA_BUILD_USING_PCH` | `ON`, `OFF` | Build using precompiled headers | `OFF` |## Building Manually Via CMake on Linux
The project can be built via CMake on Linux as follows:
```bash
cd
mkdir build-dir
cd build-dir
cmake [-G ] [configuration options] ..
cmake --build . [--config ]
ctest [--config ]
```For example, to build and test the `Debug` configuration, you could do the following:
```bash
cd
mkdir build-debug
cd build-debug
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
ctest
```Likewise, for the `Release` configuration, you could do this:
```bash
cd
mkdir build-release
cd build-release
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
ctest
```> Note: CMake uses a single-configuration generator when generating makefiles, so there is no need to use the `--config` flag with CMake or the `-C` flag with CTest. When using CMake on Linux, a good practice is to create a separate build directory for each CMake build type.
The following configuration options are available on Linux:
| Name | Possible Values | Description | Default Value |
|--------------------------|--------------------------------------|--------------------------------------|---------------|
| `BUILD_TESTING` | `ON`, `OFF` | Build the test suite | `ON` |
| `CMAKE_BUILD_TYPE` | `Debug`, `Release`, `RelWithDebInfo` | Build type | `Debug` |
| `LA_BUILD_USING_PCH` | `ON`, `OFF` | Build using precompiled headers | `OFF` |
| `LA_ENABLE_SANITIZERS` | `ON`, `OFF` | Build with address and UB sanitizers | `OFF` |
| `LA_VERBOSE_TEST_OUTPUT` | `ON`, `OFF` | Write verbose test results | `OFF` |## Installing Via CMake
Installing the project can be performed as follows:
```bash
cd
mkdir build
cd buildcmake [-G ] [configuration options] -DCMAKE_INSTALL_PREFIX= ..
cmake --build . --target install
```## Packages
The Linear Algebra library is available for integration into your own project via our favorite package manager: [Conan](https://docs.conan.io/en/latest/).
### Getting the Conan package
To add the *linear_algebra* library to your project as a dependency, you need to add a remote to Conan that points to the location of the package:
```bash
pip install conan
conan remote add linear_algebra https://twonington.jfrog.io/artifactory/api/conan/conan-oss
```Once this is set, you can add the linear_algebra dependency to you project via the following signature:
```bash
linear_algebra/0.7.0@conan-oss/testing
```Available versions of the Linear Algebra package can be search via Conan:
```bash
conan search linear_algebra
```### Building the Conan package
The linear_algebra project and package can be built locally via the Conan as such:
```bash
cd
pip install conan
conan create [conan options] [--test-folder None]
```