id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
cpp_utility/76362_31_0.txt
# Saved searches
cpp_utility/76362_92_0.txt
Collaborator
cpp_utility/constexprarraysize_68_0.txt
### Is there a language solution for this? __
cpp_utility/constexprarraysize_57_0.txt
template <typename T> constexpr auto type_size(type_t<T>) -> decltype(T::size()) { return T::size(); }
cpp_utility/cpp_classes_5_5.txt
plate:cpp/container/array/dsc_to_array&action=edit) ---|--- [ integral_constant bool_constant ](/w/cpp/types/integral_constant "cpp/types/integral constant") (C++11) (C++17) | compile-time constant of specified type with specified value (class template) [ [edit] ](https://en.cppreference.com/mwiki/index.ph...
cpp_utility/76362_89_0.txt
[ ![@EugeneZelenko](https://avatars.githubusercontent.com/u/9355329?s=40&v=4) ](/EugeneZelenko) [ EugeneZelenko ](/EugeneZelenko) added [ clang:diagnostics ](/llvm/llvm-project/labels/clang%3Adiagnostics) New/improved warning or error message in Clang, but not in clang-tidy or static analyzer [ false-negative ](/llvm/...
cpp_utility/0eQsx6ip1DwJpli1_92_0.txt
Once you've specified in interface documentation that a function can appear in a constant expression, what does anyone gain from having a "sometimes this forms a constant expression" annotation in the code?
cpp_utility/constexprarraysize_77_0.txt
f(c_array); // now ok f(cpp_array); // now ok
cpp_utility/76362_110_0.txt
[ Sign up for free ](/join?source=comment-repo) **to join this conversation on GitHub** . Already have an account? [ Sign in to comment ](/login?return_to=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm- project%2Fissues%2F76362)
cpp_utility/0eQsx6ip1DwJpli1_133_0.txt
I wasn't aware of the history, so thanks!
cpp_utility/0eQsx6ip1DwJpli1_5_0.txt
Training
cpp_utility/76362_68_0.txt
constexpr std::array Array = {1, 2};
cpp_utility/76362_113_0.txt
Labels
cpp_utility/76362_67_0.txt
#include <array>
cpp_utility/constexprarraysize_7_0.txt
__ __ Cancel
cpp_utility/76362_117_0.txt
Milestone
cpp_utility/CanIconstexpranstdar_43_0.txt
No.
cpp_utility/0eQsx6ip1DwJpli1_89_0.txt
The user can't detect whether a function is declared constexpr, only whether a given function call may appear in a constant expression. Aside from constexpr functions whose entire definitions are provided, such as numeric_limits members, there's no guarantee about how any standard constexpr function must be used to for...
cpp_utility/76362_108_0.txt
All reactions
cpp_utility/0eQsx6ip1DwJpli1_97_0.txt
Reply to author
cpp_utility/constexprarraysize_61_0.txt
constexpr int arr[] = {1, 2, 3, 4, 5}; constexpr std::span<int> s = arr;
cpp_utility/0eQsx6ip1DwJpli1_244_0.txt
>> Actually, it's worse than you think. I originally used N3690 as a C++14 reference for my proposal (a future N3794), then I discovered there's a later draft: N3691. That draft stripped "constexpr" off of all of array 's methods, except for size , empty , and max_size . So my proposal followed the later draft.
cpp_utility/constexprarraysize_102_0.txt
This post is licensed under [ CC BY 4.0 ](https://creativecommons.org/licenses/by/4.0/) by the author.
cpp_utility/0eQsx6ip1DwJpli1_176_0.txt
>> David Krauss < [ pot...@gmail.com ]() > writes: > > [...] > > | TBH I don't really understand why we need the constexpr qualifier for > | functions in the first place. > > I am not sure what you mean by this: (1) that you are unaware of how the > constexpr keyword came to be? or (2) that you know the history bu...
cpp_utility/0eQsx6ip1DwJpli1_198_0.txt
I could re-add "constexpr" to various array methods during a revision. But you have to show that said decorator is the best choice. Using the "constexpr" decorator forces all implementors to use it for a given method from that point on. So you have to show that a given method can be implemented as constexpr , that all...
cpp_utility/constexprarraysize_20_0.txt
void check(int const (&param)[3]) { int local[] = {1, 2, 3}; constexpr auto s0 = array_size(local); // ok constexpr auto s1 = array_size(param); // error }
cpp_utility/76362_42_0.txt
* [ Notifications ](/login?return_to=%2Fllvm%2Fllvm-project) * [ Fork 10.5k ](/login?return_to=%2Fllvm%2Fllvm-project) * [ Star 25.7k ](/login?return_to=%2Fllvm%2Fllvm-project)
cpp_utility/76362_13_0.txt
* [ CI/CD & Automation ](https://github.com/solutions/ci-cd) * [ DevOps ](https://github.com/solutions/devops) * [ DevSecOps ](https://resources.github.com/devops/fundamentals/devsecops)
cpp_utility/0eQsx6ip1DwJpli1_11_0.txt
Labels
cpp_utility/constexprarraysize_43_0.txt
void f(std::span<int, 5>);
cpp_utility/76362_87_0.txt
All reactions
cpp_utility/0eQsx6ip1DwJpli1_297_0.txt
Close search
cpp_utility/76362_7_0.txt
Explore
cpp_utility/76362_83_0.txt
edited
cpp_utility/CanIconstexpranstdar_0_0.txt
Can I constexpr an std::array? Sort Profile photo for John R. Grout John R. Grout Programmed in C++ since cfront daysAuthor has 2.5K answers and 1.7M answer views · 4y Originally Answered: Can I constexpr an std: :array? Not only can you do that… you can compute all of its values at compile time!
cpp_utility/0eQsx6ip1DwJpli1_221_0.txt
>> `
cpp_utility/cpp_classes_1_2.txt
mmon vocabulary types | [ pair ](/w/cpp/utility/pair "cpp/utility/pair") --- [ tuple ](/w/cpp/utility/tuple "cpp/utility/tuple") (C++11) [ optional ](/w/cpp/utility/optional "cpp/utility/optional") (C++17) [ any ](/w/cpp/utility/any "cpp/utility/any") (C++17) [ variant ](/w/cpp/utility/variant "cpp/ut...
cpp_utility/0eQsx6ip1DwJpli1_293_0.txt
 Forward
cpp_utility/0eQsx6ip1DwJpli1_144_0.txt
Forward
cpp_utility/0eQsx6ip1DwJpli1_66_0.txt
The fact that std::array is applying constexpr to the const overloads alone is simply a consequence of the fact that the proposing paper was written at a time, where the rules were different and would not have allowed that. Fixing the inconsistent difference of constexpr non-static member functions versus free or stat...
cpp_utility/0eQsx6ip1DwJpli1_93_0.txt
![Gabriel Dos Reis's profile photo](//lh3.googleusercontent.com/a-/ALV- UjVW4OFlDr9Bw4WDM3C-Z_4g3zS3ML4n5VZ6mKjI7NqkVJBMUg=s40-c)
cpp_utility/constexprarraysize_42_0.txt
But that isn’t necessarily the case for ` span<T, 5> ` \- we certainly don’t want that to be implicitly constructible from ` vector<T> ` , since how do we know if the incoming vector has enough elements in it? The direction we’re going (see [ P1976 ](https://wg21.link/p1976) ) is that this constructor will instead be `...
cpp_utility/0eQsx6ip1DwJpli1_59_0.txt
Report message
cpp_utility/0eQsx6ip1DwJpli1_42_0.txt
Which doesn't compile because of the lack of constexpr reference operator[]. So instead I ended up doing the sort inside a plain C-array and then copy it into a std::array. It works, but the code is weirder and harder to read :
cpp_utility/cpp_classes_5_2.txt
destructible") (C++11) (C++11) (C++11) [ has_virtual_destructor ](/w/cpp/types/has_virtual_destructor "cpp/types/has virtual destructor") (C++11) [ is_swappable_with is_swappable is_nothrow_swappable_with is_nothrow_swappable ](/w/cpp/types/is_swappable "cpp/types/is swappable") (C++17) (C++17) (C++17) (C++...
cpp_utility/76362_76_0.txt
[ ![@github-actions](https://avatars.githubusercontent.com/in/15368?s=40&v=4) ](/apps/github-actions) [ github-actions ](/apps/github-actions) bot added the [ new issue ](/llvm/llvm-project/labels/new%20issue) label Dec 25, 2023
cpp_utility/0eQsx6ip1DwJpli1_22_0.txt
Sign in to reply to author
cpp_utility/0eQsx6ip1DwJpli1_2_0.txt
All groups and messages
cpp_utility/0eQsx6ip1DwJpli1_255_0.txt
Forward
django_CharField/workingwithjson_125_0.txt
This page describes how to work with JSON using Spanner.
django_CharField/workingwithjson_81_0.txt
* [ Modify data using the Google Cloud console ](/spanner/docs/modify-data) * [ Modify data using the gcloud CLI ](/spanner/docs/modify-gcloud) * Modify data using DML
django_CharField/jsondata_175_0.txt
* [ Get started with BigQuery ML ](/bigquery/docs/create-machine-learning-model) * Generative AI
django_CharField/jsondatahtml_3_0.txt
* [ Getting Help and Reporting Issues ](../support.html) * [ Making Contributions ](../contribute.html) * * * *
django_CharField/workingwithjson_150_0.txt
public class AddJsonColumnAsyncSample { public async Task AddJsonColumnAsync(string projectId, string instanceId, string databaseId) { string connectionString = $"Data Source=projects/{projectId}/instances/{instanceId}/databases/{databaseId}"; string alterStatement = "ALTER TABLE Venues ADD COLUMN VenueDetails JSON";
django_CharField/607740_101_0.txt
](http://twitter.com/share?text=Application Integration - json scheme 'number' parameter issue&url=https://www.googlecloudcommunity.com/gc/Integration- Services/Application-Integration-json-scheme-number-parameter- issue/m-p/607740)
django_CharField/workingwithjson_286_0.txt
var venues = new List<Venue>(); using var reader = await cmd.ExecuteReaderAsync(); while (await reader.ReadAsync()) { venues.Add(new Venue { VenueId = reader.GetFieldValue<int>("VenueId"), VenueDetails = reader.GetFieldValue<string>("VenueDetails") }); } return venues; } }
django_CharField/jsondata_208_0.txt
* [ Manage tables ](/bigquery/docs/managing-tables) * [ Manage table data ](/bigquery/docs/managing-table-data)
django_CharField/jsondata_97_0.txt
* [ Schedule transfers ](/bigquery/docs/play-transfer) * [ Transfer report transformation ](/bigquery/docs/play-transformation)
django_CharField/607740_192_0.txt
Associated Products
django_CharField/jsondata_68_0.txt
* [ Introduction ](/bigquery/docs/connections-api-intro) * [ Amazon S3 connection ](/bigquery/docs/omni-aws-create-connection) * [ Apache Spark connection ](/bigquery/docs/connect-to-spark) * [ Azure Blob Storage connection ](/bigquery/docs/omni-azure-create-connection) * [ Cloud resource connection ](/bigquery/do...
django_CharField/workingwithjson_184_0.txt
### Python
django_CharField/jsondata_381_0.txt
Alternatively, you can use the [ ` STRING ` ](/bigquery/docs/reference/standard-sql/json_functions#string_for_json) function which extracts a JSON string and returns that value as a SQL ` STRING ` . For example:
django_CharField/jsondata_235_0.txt
* [ Introduction ](/bigquery/docs/labels-intro) * [ Add labels ](/bigquery/docs/adding-labels) * [ View labels ](/bigquery/docs/viewing-labels) * [ Update labels ](/bigquery/docs/updating-labels) * [ Filter using labels ](/bigquery/docs/filtering-labels) * [ Delete labels ](/bigquery/docs/deleting-labels)
django_CharField/607740_59_0.txt
![copyURLs](
django_CharField/workingwithjson_106_0.txt
* [ Query optimizer overview ](/spanner/docs/query-optimizer/overview) * [ Query optimizer versions ](/spanner/docs/query-optimizer/versions) * [ List query optimizer versions ](/spanner/docs/query-optimizer/version-statistics) * [ Manage the query optimizer ](/spanner/docs/query-optimizer/manage-query-optimizer)
django_CharField/607740_118_0.txt
If you are still not able to get JSON.SetProperty work, can you ping me your data mapping and JSON variable schema ?
django_CharField/workingwithjson_187_0.txt
spanner_client = spanner.Client() database_admin_api = spanner_client.database_admin_api
django_CharField/jsondata_215_0.txt
* [ Introduction ](/bigquery/docs/reservations-intro) * [ Slots ](/bigquery/docs/slots) * [ Slot reservations ](/bigquery/docs/reservations-workload-management) * [ Slots autoscaling ](/bigquery/docs/slots-autoscaling-intro) * Use reservations
django_CharField/workingwithjson_353_0.txt
* [ Google Cloud documentation ](/docs/) * [ Google Cloud quickstarts ](/docs/get-started/) * [ Google Cloud Marketplace ](/marketplace/) * [ Learn about cloud computing ](/discover/) * [ Support ](/support-hub/) * [ Code samples ](/docs/samples) * [ Cloud Architecture Center ](/architecture/) * [ Training ](/learn/tra...
django_CharField/jsondata_209_0.txt
* Table clones
django_CharField/jsondata_24_0.txt
* Try the command-line tool
django_CharField/607740_128_0.txt
![Share](
django_CharField/workingwithjson_243_0.txt
// Instantiate Spanner table objects. const venuesTable = database.table('Venues');
django_CharField/607740_206_0.txt
[ View all ](/gc/solutions/acceptedsolutionsleaderboardpage/node-display- id/board%3Acloud-integration-services/timerange/one_month)
django_CharField/workingwithjson_217_0.txt
To authenticate to Spanner, set up Application Default Credentials. For more information, see [ Set up authentication for a local development environment ](/docs/authentication/provide-credentials-adc#local-dev) .
django_CharField/workingwithjson_140_0.txt
A JSON column can be added to a table when the table is created. JSON type values can be nullable.
django_CharField/jsondata_227_0.txt
* Audit workloads
django_CharField/workingwithjson_71_0.txt
* [ Integrate with SQLAlchemy (GoogleSQL) ](/spanner/docs/use-sqlalchemy) * [ Integrate with SQLAlchemy (PostgreSQL) ](/spanner/docs/use-sqlalchemy-pg)
django_CharField/607740_34_0.txt
* [ Community Feedback ](/gc/Community-Feedback/bd-p/cloud-community-feedback)
django_CharField/607740_89_0.txt
[ ](https://www.googlecloudcommunity.com/gc/forums/v5/forumtopicpage.kudosbuttonv2.kudoentity:kudoentity/kudosable- gid/605739?t:ac=board-id/cloud-integration-services/message- id/353&t:cp=kudos/contributions/tapletcontributionspage "Click here to give likes to this post.")
django_CharField/jsondata_421_0.txt
* ### Why Google
django_CharField/workingwithjson_57_0.txt
* [ Import and export data in CSV format ](/spanner/docs/import-export-csv) * [ Import data from PostgreSQL using COPY ](/spanner/docs/import-copy) * [ Bulk loading best practices ](/spanner/docs/bulk-loading) * Disaster recovery
django_CharField/jsondata_406_0.txt
For more information about arrays, see [ Working with arrays in GoogleSQL ](/bigquery/docs/arrays) .
django_CharField/django_CharField_15_0.txt
### ` unique ` ¶ ` Field. ` ` unique ` ¶ If ` True ` , this field must be unique throughout the table. This is enforced at the database level and by model validation. If you try to save a model with a duplicate value in a ` unique ` field, a [ ` django.db.IntegrityError ` ](../../exceptions/#django.db....
django_CharField/jsondatahtml_6_0.txt
Using the JSON Data Model
django_CharField/workingwithjson_227_0.txt
return nil }
django_CharField/jsondata_48_0.txt
* Tables
django_CharField/jsondatahtml_33_0.txt
// The following are all equivalent time_t epoch = now.ToEpochTime(); DateTime from_epoch(epoch);
django_CharField/jsondata_278_0.txt
* If you use a [ batch load job ](/bigquery/docs/batch-loading-data) to ingest JSON data into a table, the source data must be in CSV, Avro, or JSON format. Other batch load formats are not supported. * The ` JSON ` data type has a nesting limit of 500. * You can't use [ legacy SQL ](/bigquery/docs/reference/standard-s...
django_CharField/jsondata_220_0.txt
* [ Introduction ](/bigquery/docs/bi-engine-intro) * [ Reserve BI Engine capacity ](/bigquery/docs/bi-engine-reserve-capacity) * [ Use preferred tables ](/bigquery/docs/bi-engine-preferred-tables)
django_CharField/workingwithjson_6_0.txt
* [ Access and resources management ](https://cloud.google.com/docs/access-resources) * [ Cloud SDK, languages, frameworks, and tools ](https://cloud.google.com/docs/devtools) * [ Costs and usage management ](https://cloud.google.com/docs/costs-usage) * [ Infrastructure as code ](https://cloud.google.com/docs/iac) ...
django_CharField/jsondatahtml_23_0.txt
void ProcessData(const JsonCppData& data);
django_CharField/workingwithjson_38_0.txt
* [ TTL overview ](/spanner/docs/ttl) * [ Manage data retention with TTL ](/spanner/docs/ttl/working-with-ttl) * [ TTL metrics and monitoring ](/spanner/docs/ttl/monitoring-and-metrics)
django_CharField/workingwithjson_323_0.txt
### Python
django_CharField/jsondata_3_0.txt
* [ AI solutions, generative AI, and ML ](https://cloud.google.com/docs/ai-ml) * [ Application development ](https://cloud.google.com/docs/application-development) * [ Application hosting ](https://cloud.google.com/docs/application-hosting) * [ Compute ](https://cloud.google.com/docs/compute-area) * [ Data analytic...
django_CharField/607740_149_0.txt
Q. Using JSON.SetProperty without default value
django_CharField/607740_136_0.txt
![copyURLs](
django_CharField/607740_170_0.txt
Staff
django_CharField/workingwithjson_138_0.txt
JSON documents must be encoded in UTF-8. Transactions or queries with JSON documents encoded in other formats return an error.
django_CharField/jsondatahtml_1_0.txt
* Getting Started * [ Obtaining and Installing Libraries ](../start/installation.html) * [ Jumping In ](../start/get_started.html) * [ Understanding the Scope ](../activity_model.html) * [ Understanding the Code Base ](../object_model.html) * [ Available Specialized Service APIs ](../available_service_apis.html) * * * ...