remove user defined warnings, remove win icc ci

This commit is contained in:
ado 2021-02-27 12:41:51 +01:00
parent bfd561805b
commit 46e1d70551
3 changed files with 4 additions and 81 deletions

View File

@ -1,71 +0,0 @@
name: win-icc-ci
on:
push:
branches:
- master
- feature/**
- improvement/**
- bugfix/**
pull_request:
branches:
- master
- feature/**
- improvement/**
- bugfix/**
env:
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17453/w_BaseKit_p_2021.1.0.2664_offline.exe
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17392/w_HPCKit_p_2021.1.0.2682_offline.exe
jobs:
icc_tests:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: cache install
id: cache-install
uses: actions/cache@v2
with:
path: C:\Program Files (x86)\Intel\oneAPI\compiler
key: >-
install-${{ env.WINDOWS_HPCKIT_URL }}-
${{ env.WINDOWS_CPP_COMPONENTS }}-
compiler-${{ hashFiles('**/script/cache_exclude_windows.sh') }}
- name: Install icc
run: >-
script/ci_win_install_icc.bat $WINDOWS_HPCKIT_URL
$WINDOWS_CPP_COMPONENTS
- name: CMake
run: echo "/host_usr_local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: script/ci_install_deps.sh
- name: Setup icc
run: script/ci_win_setup_icc.bat
- name: Configure
run: >-
dpcpp -v &&
cmake -DCMAKE_CXX_COMPILER=dpcpp -S test -B build
-DCMAKE_BUILD_TYPE=Debug
- name: Build
run: >-
cmake --build build -j ${{ steps.cores.outputs.count }}
- name: Run
working-directory: build
run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }}

View File

@ -1,5 +1,6 @@
# Static split parser
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
A header only "csv" parser which is fast and versatile with modern C++ api. Requires compiler with C++17 support.

View File

@ -18,11 +18,11 @@ namespace ss {
template <typename T>
std::enable_if_t<std::is_floating_point_v<T>, std::optional<T>> to_num(
const char* begin, const char* const end) {
const char* const begin, const char* const end) {
T ret;
auto answer = fast_float::from_chars(begin, end, ret);
auto [ptr, ec] = fast_float::from_chars(begin, end, ret);
if (answer.ec != std::errc() || answer.ptr != end) {
if (ec != std::errc() || ptr != end) {
return std::nullopt;
}
return ret;
@ -169,13 +169,6 @@ bool shift_and_add_overflow(T& value, T digit, F add_last_digit_owerflow) {
}
#else
#ifndef SS_NO_WARNINGS
#ifdef _WIN32
#pragma warning("Use clang or gcc if possible for performance reasons. Define SS_NO_WARNINGS to supress warning.")
#else
#warning "Use clang or gcc if possible for performance reasons. Define SS_NO_WARNINGS to supress warning."
#endif
#endif
template <typename T, typename U>
bool shift_and_add_overflow(T& value, T digit, U is_negative) {
digit = (is_negative) ? -digit : digit;