Skip to content

Commit

Permalink
fix: use concepts instead of type traits
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed Nov 30, 2024
1 parent de1f9b9 commit aa30036
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/suboptimal/autodiff/Variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

#pragma once

#include <concepts>
#include <memory>
#include <type_traits>
#include <vector>

#include <Eigen/Core>
Expand All @@ -15,7 +17,7 @@ namespace suboptimal {
struct Variable;

template <typename T>
concept VariableLike = std::is_same_v<T, Variable> || std::is_arithmetic_v<T>;
concept VariableLike = std::same_as<T, Variable> || std::is_arithmetic_v<T>;

// Eigen typedefs
using VectorXv = Eigen::VectorX<Variable>;
Expand Down

0 comments on commit aa30036

Please sign in to comment.