Skip to content

Commit

Permalink
[module] import standard module support
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Dec 18, 2022
1 parent 71c12b6 commit 4bea627
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 54 deletions.
3 changes: 1 addition & 2 deletions benchmark/baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ For more information, please refer to <https://unlicense.org> */

#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
8 changes: 1 addition & 7 deletions benchmark/eigen_predict_x1x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@ For more information, please refer to <https://unlicense.org> */
#include <Eigen/Eigen>
#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <random>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
8 changes: 1 addition & 7 deletions benchmark/eigen_update_xx0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@ For more information, please refer to <https://unlicense.org> */
#include <Eigen/Eigen>
#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <random>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
3 changes: 1 addition & 2 deletions benchmark/include/benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ For more information, please refer to <https://unlicense.org> */
//! @file
//! @brief Benchmarking support.

#include <chrono>
#include <type_traits>
import std;

namespace fcarouge::benchmark {

Expand Down
3 changes: 1 addition & 2 deletions benchmark/predict_1x1x0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ For more information, please refer to <https://unlicense.org> */

#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
4 changes: 1 addition & 3 deletions benchmark/predict_1x1x1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ For more information, please refer to <https://unlicense.org> */

#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
#include <random>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
4 changes: 1 addition & 3 deletions benchmark/update_1x1x0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ For more information, please refer to <https://unlicense.org> */

#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
#include <random>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
4 changes: 1 addition & 3 deletions benchmark/update_1x1x1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ For more information, please refer to <https://unlicense.org> */

#include <benchmark/benchmark.h>

#include <algorithm>
#include <chrono>
#include <random>
import std;

namespace fcarouge::benchmark {
namespace {
Expand Down
3 changes: 2 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org> ]]

if(WIN32)
set(OPTIONS "/EHsc" "/W4")
set(OPTIONS "/EHsc" "/W4" "/experimental:module" "/std:c++latest")
else()
set(LIBRARIES kalman_format)
set(OPTIONS
"-ansi"
"-fno-check-new"
"-fno-common"
"-fstrict-aliasing"
"-fmodules-ts"
"-pedantic"
"-Wall"
"-Wcast-align"
Expand Down
3 changes: 1 addition & 2 deletions include/fcarouge/internal/format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ For more information, please refer to <https://unlicense.org> */

#include "utility.hpp"

#include <cstddef>
#include <format>
import std;

namespace fcarouge {
template <typename, typename, typename, typename, typename, typename>
Expand Down
4 changes: 1 addition & 3 deletions include/fcarouge/internal/kalman.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ For more information, please refer to <https://unlicense.org> */

#include "utility.hpp"

#include <functional>
#include <tuple>
#include <type_traits>
import std;

namespace fcarouge::internal {

Expand Down
3 changes: 1 addition & 2 deletions include/fcarouge/internal/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ For more information, please refer to <https://unlicense.org> */
#ifndef FCAROUGE_INTERNAL_UTILITY_HPP
#define FCAROUGE_INTERNAL_UTILITY_HPP

#include <concepts>
#include <type_traits>
import std;

namespace fcarouge::internal {

Expand Down
6 changes: 1 addition & 5 deletions include/fcarouge/kalman.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ For more information, please refer to <https://unlicense.org> */
#include "internal/kalman.hpp"
#include "internal/utility.hpp"

#include <concepts>
#include <cstddef>
#include <functional>
#include <type_traits>
#include <utility>
import std;

namespace fcarouge {

Expand Down
3 changes: 2 additions & 1 deletion sample/ekf_4x1x0_soaring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include <Eigen/Eigen>

#include <cassert>
#include <cmath>

import std;

namespace fcarouge::sample {
namespace {
Expand Down
2 changes: 2 additions & 0 deletions sample/kf_1x1x0_building_height.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <cassert>

import std;

namespace fcarouge::sample {
namespace {
//! @brief Estimating the height of a building.
Expand Down
3 changes: 2 additions & 1 deletion sample/kf_1x1x0_liquid_temperature.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "fcarouge/kalman.hpp"

#include <cassert>
#include <cmath>

import std;

namespace fcarouge::sample {
namespace {
Expand Down
3 changes: 2 additions & 1 deletion sample/kf_1x1x1_dog_position.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "fcarouge/kalman.hpp"

#include <cassert>
#include <cmath>

import std;

namespace fcarouge::sample {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions sample/kf_2x1x1_rocket_altitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <Eigen/Eigen>

#include <cassert>
#include <chrono>
#include <cmath>

import std;

namespace fcarouge::sample {
namespace {
Expand Down
3 changes: 2 additions & 1 deletion sample/kf_6x2x0_vehicle_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include <Eigen/Eigen>

#include <cassert>
#include <cmath>

import std;

namespace fcarouge::sample {
namespace {
Expand Down
3 changes: 2 additions & 1 deletion sample/kf_8x4x0_deep_sort_bounding_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include <Eigen/Eigen>

#include <cassert>
#include <cmath>

import std;

namespace fcarouge::sample {
namespace {
Expand Down
5 changes: 1 addition & 4 deletions support/format
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ For more information, please refer to <https://unlicense.org> */
#include <fmt/ranges.h>
#include <fmt/xchar.h>

#include <cstdio>
#include <locale>
#include <string>
#include <string_view>
import std;

namespace fcarouge {
template <typename, typename, typename, typename, typename, typename>
Expand Down
3 changes: 2 additions & 1 deletion test/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ For more information, please refer to <https://unlicense.org> */
#include "fcarouge/kalman.hpp"

#include <cassert>
#include <format>

import std;

namespace fcarouge::test {
namespace {
Expand Down

0 comments on commit 4bea627

Please sign in to comment.