DAW JSON Link
daw_json_exec_modes.h
Go to the documentation of this file.
1 // Copyright (c) Darrell Wright
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
5 //
6 // Official repository: https://github.com/beached/daw_json_link
7 //
8 
9 #pragma once
10 
11 #include "version.h"
12 
13 #include <daw/daw_scope_guard.h>
14 
15 #include <string_view>
16 
17 namespace daw::json {
18  inline namespace DAW_JSON_VER {
20  static constexpr std::string_view name = "constexpr";
21 #if defined( DAW_HAS_CONSTEXPR_SCOPE_GUARD )
22  static constexpr bool always_rvo = true;
23 #else
24  static constexpr bool always_rvo = false;
25 #endif
26  static constexpr bool can_constexpr = true;
27  };
29  static constexpr std::string_view name = "runtime";
30  static constexpr bool always_rvo = true;
31  static constexpr bool can_constexpr = false;
32  };
33 #if defined( DAW_ALLOW_SSE42 )
34  struct sse42_exec_tag : runtime_exec_tag {
35  static constexpr std::string_view name = "sse4.2";
36  static constexpr bool always_rvo = true;
37  static constexpr bool can_constexpr = false;
38  };
39  using simd_exec_tag = sse42_exec_tag{ };
40 #else
42 #endif
44  } // namespace DAW_JSON_VER
45 } // namespace daw::json
Definition: daw_from_json.h:22
Definition: daw_json_exec_modes.h:19
static constexpr bool can_constexpr
Definition: daw_json_exec_modes.h:26
static constexpr std::string_view name
Definition: daw_json_exec_modes.h:20
static constexpr bool always_rvo
Definition: daw_json_exec_modes.h:24
Definition: daw_json_exec_modes.h:28
static constexpr bool always_rvo
Definition: daw_json_exec_modes.h:30
static constexpr std::string_view name
Definition: daw_json_exec_modes.h:29
static constexpr bool can_constexpr
Definition: daw_json_exec_modes.h:31
Definition: daw_json_exec_modes.h:41
#define DAW_JSON_VER
Definition: version.h:11